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 réponse
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
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions