- Newest
- Most votes
- Most comments
+1
Been trying to get this working today on Aurora PostgreSQL on us-east-1 and does not work. Get the same error reported here. I'm also trying to migrate my DB into an encrypted cluster.
answered 15 days ago
I haven't tried this myself yet, but indeed the feature is documented, but as far as I understand there is no "What's New" announcement for it yet, so it may not be rolled out in every Region.
My understanding what the docs day:
- The RDS User Guide lists "Encrypting the green environment" under Blue/Green considerations: set
TargetKmsKeyIdper source DB instance inTargetResourceConfigurations. The key must exist, be enabled, and you need permission to use it. Unencrypted read replicas need their own entry. First link. - The API reference describes
TargetResourceConfigurationthe same way (SourceArnrequired,TargetKmsKeyIdfor an unencrypted source or a key change). Second link herubder.
Your CLI accepted the parameter and the error came back from the RDS API, so this isn't a syntax problem on your side. The service endpoint you called rejected the parameter. Until recently AWS said this wasn't possible at all (see "Options for changing AWS KMS encryption key for Amazon RDS databases" on the AWS Database Blog - last link herunder), so it's a new capability.
I would open an support request and ask whether TargetResourceConfigurations is enabled in your Region. Meanwhile, the established path still works: snapshot → copy with encryption → restore, or one of the low-downtime options the last link:
- https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments-considerations.html
- https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_TargetResourceConfiguration.html
- https://aws.amazon.com/blogs/database/options-for-changing-aws-kms-encryption-key-for-amazon-rds-databases/
PS: Quick sanity check: You could try running the exact same CLI command against us-east-1. New API features almost always deploy there first — if it works in Virginia but fails in your region, it confirms a regional rollout lag.
Adding to Florian's answer with the low-downtime path that works today for MySQL and MariaDB, since the docs-only feature still fails for several people (including us-east-1 per the comments).
Check if your Region accepts it yet (cheap, no resources created if it fails):
aws rds create-blue-green-deployment \ --blue-green-deployment-name kms-probe \ --source <instance ARN> \ --target-resource-configurations '[{"SourceArn":"<instance ARN>","TargetKmsKeyId":"<key ARN>"}]' \ --region <region>
Use the key ARN rather than the alias, and make sure you are on a recent CLI. If it still returns InvalidParameterCombination ... not supported, the API endpoint has not enabled it; nothing on your side will change that.
What works now: encrypted copy of a paused replica + binlog replication
- On the unencrypted source, keep binlogs long enough for the whole procedure:
CALL mysql.rds_set_configuration('binlog retention hours', 48); - Create a read replica of the source. When it has caught up, stop replication on it (
CALL mysql.rds_stop_replication;) and recordRelay_Source_Log_FileandExec_Source_Log_PosfromSHOW REPLICA STATUS. That is the exact position your copy will start from. - Snapshot the paused replica, copy the snapshot with
--kms-key-id, and restore the encrypted copy as a new instance. Delete the temporary replica afterwards. - On the new encrypted instance, point it at the source with the recorded file and position:
CALL mysql.rds_set_external_source(...), thenCALL mysql.rds_start_replication; - When
Seconds_Behind_Sourceis 0, stop writes on the source, wait for the replica to catch up, stop replication withCALL mysql.rds_reset_external_source;, and move the application (swap the DNS name, or rename the instances).
Downtime is the cutover only, usually a few minutes. Two common pitfalls: the replication user needs replication privileges on the source and the security group must allow the new instance to reach it; and any read replicas need to be recreated from the new encrypted primary.
For Aurora PostgreSQL (the +1 comment), the equivalent is restoring an encrypted snapshot and using logical replication (publication on the old cluster, subscription on the new one) or DMS CDC to catch up before cutover.
answered 3 days ago

I've also been trying to get this to work in
us-east-1with no luck. Same error.