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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ