Skip to content

Instantly share code, notes, and snippets.

@madsonic
Created March 2, 2020 23:10
Show Gist options
  • Save madsonic/90bbd8a68447150226963723b88f9dfe to your computer and use it in GitHub Desktop.
Save madsonic/90bbd8a68447150226963723b88f9dfe to your computer and use it in GitHub Desktop.
aws rds certificate rotation
# 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