Skip to content

Instantly share code, notes, and snippets.

@jupemara
Last active February 16, 2016 04:34
Show Gist options
  • Save jupemara/379638a3a326172c20c4 to your computer and use it in GitHub Desktop.
Save jupemara/379638a3a326172c20c4 to your computer and use it in GitHub Desktop.
Can I create RDS read replica in another subnet group to same region by RDS API?
var RDS, params, rds;
RDS = require('aws-sdk').RDS;
rds = new RDS({
region: 'ap-northeast-1'
});
params = {
DBInstanceIdentifier: 'db-xxx-002',
SourceDBInstanceIdentifier: 'db-xxx-001',
DBInstanceClass: 'db.t2.small',
DBSubnetGroupName: 'staging'
};
rds.createDBInstanceReadReplica(params, function(err, data) {
if (err) {
console.log(err.stack);
return;
}
console.log(data);
});
@jupemara
Copy link
Author

I got following error

DBSubnetGroupNotAllowedFault: DbSubnetGroupName should not be specified for read replicas that are created in the same region as the master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment