aws-rds - Impossible to define a DatabaseInstanceReadReplica from a DatabaseCluster
See original GitHub issueAurora 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:
- Created 4 years ago
- Reactions:6
- Comments:7 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 thanDatabaseInstanceReadReplica
if it did exist.Any alternatives or workaround to create a read replica of a cluster (or member instance writer/reader of a cluster)?
I’m not sure. Do you know how would you set it up using CloudFormation by any chance?