0

我正在尝试使用对流层设置 Aurora,但在网上找不到任何好的示例。谁能提供一个极光对流层设置的好例子?

4

2 回答 2

3

为了设置 aurora,您应该确保正确设置了数据库实例和数据库集群。下面是在 VPC 中设置极光的代码片段。

pipelinedbcluster = rds.DBCluster(
        title='PipelineDBCluster',
        DatabaseName=<your-db-name>,
        DBClusterIdentifier=<your-cluster-name>,
        DBSubnetGroupName=<your-subnet-group>,
        DBClusterParameterGroupName='default.aurora-postgresql9.6',
        DeletionProtection=False,
        Engine='aurora-postgresql',
        EngineVersion='9.6.8',
        MasterUsername=<your-username>,
        MasterUserPassword=<your-password>,
        Port=5432,
        VpcSecurityGroupIds=<your-primary-vpc-id>, #(required if creating aurora cluster in a VPC)
    )
pipelinedb = rds.DBInstance(
        title='PipelineDBInstance',
        DBInstanceIdentifier=<your-instance-name>,
        DBClusterIdentifier=Ref(pipelinedbcluster),
        DBInstanceClass='db.r4.large',
        Engine='aurora-postgresql',
        EngineVersion='9.6.8',
        PubliclyAccessible=False,
        Tags=<your-tags>,
        AutoMinorVersionUpgrade=True,
        StorageType='aurora'
    )
  • 在对流层的模板中添加以上两个资源。
于 2019-06-19T11:43:26.610 回答
0

在此处尝试 Aurora 蓝图。

于 2017-11-27T18:30:11.597 回答