AWSSupportRemediator-EnableRdsBackupRetention - AWS Systems Manager Automation Runbook Reference
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

AWSSupportRemediator-EnableRdsBackupRetention

Description

Enables automated backups for an Amazon Relational Database Service (Amazon RDS) DB instance by setting the backup retention period to a non-zero value (1-35 days).

This automation remediates findings identified by AWS Well-Architected Agent. It remediates findings from AWS Trusted Advisor check Amazon RDS Backups.

If the DB instance does not exist, the backup retention period is already set to a non-zero value, or a pending change exists to enable backup retention, the automation completes successfully without making changes.

If ApplyImmediately is set to true and the DB instance has pending changes other than backup retention, the automation fails to prevent unintended application of those changes.

Enabling automated backups might increase storage costs. For more information about pricing, see Amazon RDS pricing.

Important considerations
  • You are responsible for reviewing automation actions before they run.

  • This automation might cause stack drift if the resource is part of an AWS CloudFormation stack.

  • Access to AWSSupportRemediator-* runbooks requires an active Business Support+, Enterprise Support, or Unified Operations Support plan. For more information, see Compare AWS Support Plans on the AWS website.

Document type

Automation

Owner

Amazon

Platforms

Linux, macOS, Windows

Parameters

  • AutomationAssumeRole

    Type: String

    Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook.

  • DBInstanceIdentifier

    Type: String

    Description: (Required) The Amazon RDS DB instance identifier, not the Amazon Resource Name (ARN).

  • ApplyImmediately

    Type: Boolean

    Description: (Optional) Whether to apply the modifications in this request and any pending modifications as soon as possible. Choose true to apply the change immediately, or false to schedule the change on the next maintenance window. If set to true and the DB instance has pending changes other than backup retention, the automation fails.

    Default: False

  • BackupRetentionPeriod

    Type: Integer

    Description: (Optional) The number of days (1-35) to retain automated backups. Setting a non-zero value enables automated backups.

    Default: 7

Required IAM permissions

The AutomationAssumeRole parameter requires the following actions to use the runbook successfully.

  • rds:DescribeDBInstances

  • rds:ModifyDBInstance

Document Steps
  1. validateDB - Validates whether the Amazon RDS DB instance exists, is in available status, and requires a backup retention period change.

  2. branchOnChangeRequired - Branches on whether modification is needed.

  3. updateDBInstance - Modifies the Amazon RDS DB instance to set the backup retention period to the specified value.

Outputs
  • validateDB.ChangeRequired: Whether the backup retention period needs to be changed.

  • validateDB.ValidationMessage: The reason when no change is required.

  • validateDB.InitialBackupRetentionPeriod: The backup retention period value before the automation runs.