create simple RDS Aurora instance

0

Hi all,

I want to create a simple MYSQL RDS Auror instance :

  • 1 instance for staging env
  • 2 instances (1 mastr + 1 replica) for PROD

I would like to know, in the case of non-stage env, if this code creates 1 Aurora DB with 1 replica (instances: 2), or create 2 mastr DB, each one of them has replicas?

 const instanceCluster = new rds.DatabaseCluster(this, 'AuroraDatabase', {
        engine,
        credentials: Credentials.fromSecret(xxxxx),
        port: xxxxxx,

        **instances: props.env["ENV"] === 'stage' ? 1 : 2,**

        defaultDatabaseName: xxxxxxx,
        instanceProps: {
      .......
     ........

Thanks.

1개 답변
0

I understand that you are using CDKv2. instances properties show # of instances within DB cluster. In the case of setting 2, DB cluster has 1 Writer, and 1 Reader instance in single DB cluster.

AWS
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인