AmazonRDS client = new AmazonRDSClient(new AWSCredentials() { @Override public String getAWSSecretKey() { return "********************"; } @Override public String getAWSAccessKeyId() { return "********************"; } }); DBInstance instance = client.promoteReadReplica(new PromoteReadReplicaRequest() .withDBInstanceIdentifier("test-db"));