how to Rotate secrets for aurora instance ,ysql/postgresql

0

How to rotate secrets(credentials) for Aurora mysql.postgresql using cloudformation. In the documentation, i see only its specified for RDS databases. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-rotationschedule.html

AWS
asked 5 months ago171 views
1 Answer
0

Hi,

Have a look the complete CFN teample at https://github.com/aws-samples/aws-aurora-cloudformation-samples/blob/master/cftemplates/Aurora-Postgres-DB-Cluster.yml

It contains the full details for all resources. The section of interest for you is:

AuroraSecretRotationSchedule:
    Condition: IsNotUseDBSnapshot
    Type: AWS::SecretsManager::RotationSchedule
    DependsOn:
      - SecretAuroraClusterAttachment
      - AuroraDBFirstInstance
    Properties:
      SecretId: !Ref AuroraMasterSecret
      RotationLambdaARN: !GetAtt CreateSecretRotationLambdaFnTrigger.SecretRotationLambdaARN
      RotationRules:
        AutomaticallyAfterDays: 30

Best,

Didier

profile pictureAWS
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions