Created
March 2, 2020 23:10
-
-
Save madsonic/90bbd8a68447150226963723b88f9dfe to your computer and use it in GitHub Desktop.
aws rds certificate rotation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rotate without restart if current connections are non SSL | |
for db in "db1" "db2"; do | |
aws rds modify-db-instance \ | |
--db-instance-identifier "$db" \ | |
--ca-certificate-identifier "rds-ca-2019" \ | |
--apply-immediately \ | |
--no-certificate-rotation-restart | |
done | |
# viewing certs | |
aws rds --region $region describe-db-instances | | |
'jq .DBInstances[] | select(.CACertificateIdentifier|test("2019")) | {"name": .DBInstanceIdentifier,"engine":.Engine,"cert":.DBCertificateIdentifier}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment