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 Antwort
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
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen