I have automated the RDS snapshot copy across the region, but the Snapshot which is encrypted gets fail to copy. I have figured a way to copy an encrypted snapshot using
$ aws rds copy-db-snapshot --source-db-snapshot-identifier arn:aws:rds:eu-west-1:XXXX:snapshot:XXX-2017-01-31-04-30 --target-db-snapshot-identifier mydbsnapshotcopy --kms-key-id XXX --region eu-central-1 --source-region eu-west-1
I want to filter/test the snapshots if they are encrypted or not, if they are encrypted I will perform the above-defined operation. I tried this which is not working.
$ aws rds describe-db-snapshots --filter "Name=encrypted,Values=true"
How do I list/filter all the encrypted snapshots and move it to a file?