question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

aws-rds - Impossible to define a DatabaseInstanceReadReplica from a DatabaseCluster

See original GitHub issue

Aurora Cluster Replication

I’m trying to create a cross-region read replica from an Aurora Cluster.

How can I provide a sourceDatabaseInstance from a DatabaseCluster instance?

https://docs.aws.amazon.com/cdk/api/latest/docs/aws-rds-readme.html

const cluster = new DatabaseCluster(this, 'database-cluster', props);

const readReplica = new DatabaseInstanceReadReplica(this, 'read-replica', {
  sourceDatabaseInstance: ???
})

Environment

  • CDK CLI Version: 1.22.0
  • Module Version: 1.15.0
  • OS: OSX Mojave
  • Language: TypeScript

Other information

Ideally, the cluster object could provide us with its replica database instances.

Alternatively, we could compute the instance Arn from cluster.instanceIdentifiers and change the signature of the DatabaseInstanceReadReplicaProps from readonly sourceDatabaseInstance: IDatabaseInstance; to readonly sourceDatabaseInstanceArn: string;

Thanks,

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
AustinMaddoxcommented, Jul 12, 2021

Thanks @skinny85 I do realize that fact. I guess the real problem is there isn’t a construct that exists for what I’m trying to do. I imagine it would be called DatabaseClusterReadReplica rather than DatabaseInstanceReadReplica if it did exist.

Any alternatives or workaround to create a read replica of a cluster (or member instance writer/reader of a cluster)?

0reactions
skinny85commented, Jul 12, 2021

I’m not sure. Do you know how would you set it up using CloudFormation by any chance?

Read more comments on GitHub >

github_iconTop Results From Across the Web

class DatabaseInstanceReadReplica (construct) · AWS CDK
A read replica database instance. Example. declare const vpc: ec2.Vpc; new rds.DatabaseInstanceFromSnapshot(this ...
Read more >
@aws-cdk/aws-rds - npm
Start using @aws-cdk/aws-rds in your project by running `npm i ... To set up a clustered database (like Aurora), define a DatabaseCluster ....
Read more >
aws-cdk.aws-rds · PyPI
To set up a clustered database (like Aurora), define a DatabaseCluster . You must always launch a database in a VPC. Use the...
Read more >
Unable to set storage size for an AWS database cluster
*** ClientError: An error occurred (InvalidParameterCombination) when calling the CreateDBInstance operation: The requested DB Instance will be ...
Read more >
How To Create Your First Database Cluster on Amazon Aurora
AWS RDS Aurora | CLUSTER DEMO | Cross Region Replica, Types of Endpoints, HA & Fully Managed · Amazon Aurora Global Database Deep...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found