Skip to main content

Storage Gateway Recovery Point Should Be Created Within

More Info:​

This rule checks if a recovery point was created for Amazon Relational Database Service (Amazon RDS). The rule is NON_COMPLIANT if the Amazon RDS instance does not have a corresponding recovery point created within the specified time period.

Risk Level​

High

Address​

Configuration

Compliance Standards​

  • APRA CPS 234 (Australia)
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • Cloudanix Best Practice
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
  • UK NCSC Cyber Assessment Framework

Triage and Remediation​

Remediation​

Using Console

To remediate the misconfiguration of not having Recovery Points created for Storage Gateway in AWS using the AWS Management Console, follow these steps:

  1. Login to AWS Console: Go to the AWS Management Console (https://aws.amazon.com/console/) and log in to your AWS account.

  2. Navigate to RDS Service: Click on the 'Services' dropdown menu at the top left corner of the console, then select 'RDS' under the 'Database' section.

  3. Select the RDS Instance: In the RDS dashboard, select the RDS instance for which you want to enable Recovery Points by clicking on the checkbox next to the instance name.

  4. Enable Automated Backups: Click on the 'Modify' button at the top of the dashboard to modify the settings of the selected RDS instance.

  5. Configure Backup Settings: Scroll down to the 'Backup' section of the Modify DB Instance page. Here, you will find the 'Backup retention period' setting. Set the desired number of days for which you want to retain automated backups. This will ensure that recovery points are created and retained for the specified period.

  6. Enable Automated Backups: Make sure that the 'Backup retention period' is set to a value greater than 0 to enable automated backups for the RDS instance.

  7. Save Changes: Scroll down to the bottom of the page and click on the 'Continue' button, review the changes, and then click on the 'Modify DB Instance' button to save the changes.

  8. Verify Configuration: Once the modification is completed, go back to the RDS dashboard and check the 'Backup' section of the RDS instance to ensure that automated backups are enabled and the backup retention period is set as per your configuration.

By following these steps, you have successfully enabled the creation of Recovery Points for the RDS instance in AWS, ensuring that automated backups are taken at regular intervals as per the specified retention period.

Using CLI

To remediate the misconfiguration of not having Storage Gateway Recovery Point created for AWS Storage Gateway using AWS CLI, you can follow these steps:

Step 1: Open your terminal or command prompt and ensure that you have AWS CLI installed and configured with the necessary permissions to work with RDS.

Step 2: Run the following AWS CLI command to modify the RDS instance to enable automated backups and set the backup retention period. Replace your-rds-instance-identifier with the actual identifier of your RDS instance and 7 with the desired backup retention period in days.

aws rds modify-db-instance --db-instance-identifier your-rds-instance-identifier --backup-retention-period 7 --apply-immediately

Step 3: Check the status of the modification by running the following command:

aws rds describe-db-instances --db-instance-identifier your-rds-instance-identifier --query 'DBInstances[*].[DBInstanceIdentifier,DBInstanceStatus]'

Step 4: Once the modification is complete and the RDS instance status is available, automated backups will be enabled, and recovery points will be created based on the specified retention period.

By following these steps, you can remediate the misconfiguration of not having Storage Gateway Recovery Point created for AWS RDS using AWS CLI.

Using Python

To remediate the misconfiguration of not having Storage Gateway Recovery Point created for AWS RDS instances, you can use Python and AWS Boto3 library to create a manual snapshot of the RDS instance. Here are the step-by-step instructions to remediate this issue:

  1. Install Boto3 library: Ensure you have the Boto3 library installed. You can install it using pip:
pip install boto3
  1. Configure AWS credentials: Make sure you have AWS credentials configured on your system. You can set it up by running:
aws configure
  1. Write Python script to create a manual snapshot: Create a Python script (e.g., create_rds_snapshot.py) with the following code snippet:
import boto3

# Define the AWS region and RDS instance identifier
region = 'your_aws_region'
instance_identifier = 'your_rds_instance_identifier'

# Create a boto3 client for RDS
rds_client = boto3.client('rds', region_name=region)

# Create a manual snapshot for the RDS instance
response = rds_client.create_db_snapshot(
DBSnapshotIdentifier='manual-snapshot-' + instance_identifier,
DBInstanceIdentifier=instance_identifier
)

print("Manual snapshot created successfully: ", response)
  1. Run the Python script: Execute the Python script using the following command:
python create_rds_snapshot.py
  1. Verify the manual snapshot: Go to the AWS Management Console, navigate to the RDS service, select your RDS instance, and check if the manual snapshot was created successfully.

By following these steps, you can remediate the misconfiguration of not having Storage Gateway Recovery Point created for AWS RDS instances using Python and Boto3 library.

Using Terraform

Terraform cannot perform the verified remediation for this finding.

The supplied fix is a one-time runtime action (aws storagegateway create-snapshot for a Storage Gateway volume). There is no Terraform resource that maps to this Storage Gateway snapshot operation, and attempting to model a one-off backup in Terraform would cause it to be recreated on every apply rather than “taken once now”.

To remediate, run the CLI command (or equivalent in the console) against the affected Storage Gateway volume:

aws storagegateway create-snapshot \
--volume-arn YOUR_STORAGE_GATEWAY_VOLUME_ARN \
--snapshot-description "Manual snapshot for compliance remediation" \
--region YOUR_AWS_REGION

Then review and, if needed, re-create the volume with an automated backup schedule, as Terraform cannot retrofit that onto an existing Storage Gateway volume either.

Additional Reading:​