5
votes

I need to create a read replica in a VPC of an RDS instance outside of the VPC

The instructions read ( http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html )- To create a read replica from a source MySQL DB instance: In the Destination DB Subnet Group box, specify a DB subnet group associated with a VPC if you want the read replica to be created in that VPC. Leave the box empty if you want the read replica to be created outside of any VPC. The VPC and DB subnet group must exist in the destination region. Within a given region, all read replicas created from the same source DB instance must be either:

Unfortunately this box doesn't show up in the gui

Using the CLI I get the following message: A client error (DBSubnetGroupNotAllowedFault) occurred when calling the CreateDBInstanceReadReplica operation: DbSubnetGroupName should not be specified for read replicas that are created in the same region as the master

Is there something else I should be doing?

1
Hi - Did you have any followups on this question?The-Big-K
Same here, if the region is the same as the source, getting the error you mentioned above. If cli region is set at the desination region, then get the The source instance could not be found error. It is odd that they do not have the --destination-region option.LeOn - Han Li

1 Answers

0
votes

Can you post your CLI commands as well? It looks like you are making the CreateDBInstanceReplica request from the source region itself. You should be making the request from the target region.

For example, if you have an instance in us-east-1 and you want a new replica in us-west-2, then:

aws rds create-db-instance-read-replica \
    --db-instance-identifier DBInstanceIdentifier \
    --region us-west-2 \
    --source-db-instance-identifier arn:aws:rds:us-east-1:123456789012:db:my-mysql-instance \
    --source-region us-east-1 \
    --kms-key-id my-us-east-1-key

Note that the CLI request is explicitly made for us-west-2, but source instance is us-east-1.