More Info:

If your RDS databases are running low on disk space, they introduce a high risk of hurting your performance and availability.

Risk Level

High

Address

Operational Maturity, Reliability, Security

Compliance Standards

CBP

Triage and Remediation

Remediation

Using Console

To remediate the issue of RDS databases not having free storage space in AWS, you can follow these steps using the AWS Management Console:
  1. Login to AWS Console: Go to the AWS Management Console (https://aws.amazon.com/) and login to your 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 category.
  3. Select the RDS Instance: From the list of RDS instances, identify the database that is running low on storage space and click on its name to open its details.
  4. Modify the Instance: In the RDS instance details page, click on the “Modify” button at the top right corner.
  5. Increase Storage: In the Modify DB Instance page, locate the “Allocated Storage” setting and increase the storage capacity to add more free space to the database. You can do this by either entering the desired storage size directly or by adjusting the slider.
  6. Apply Changes: Scroll down to the bottom of the page and click on the “Continue” button.
  7. Review and Apply Changes: Review the changes you are about to make, including the storage increase, and then click on the “Modify DB Instance” button to apply the changes.
  8. Monitor the Operation: The modification process will begin, and you can monitor the progress in the RDS console. Once the modification is complete, the database will have more free storage space available.
By following these steps, you can remediate the issue of RDS databases not having free storage space in AWS by increasing the allocated storage for the RDS instance.

To remediate the misconfiguration of RDS databases not having free storage space in AWS using AWS CLI, follow these steps:
  1. Identify the affected RDS instances: Run the following AWS CLI command to list all the RDS instances that have storage space running out:
    aws rds describe-db-instances --query "DBInstances[?FreeStorageSpace < 1000000000].DBInstanceIdentifier" --output text
    
  2. Modify the allocated storage for the affected RDS instance: Run the following AWS CLI command to modify the allocated storage for the affected RDS instance. Replace <DBInstanceIdentifier> with the identifier of the affected RDS instance and <newStorageSize> with the desired new storage size in GB:
    aws rds modify-db-instance --db-instance-identifier <DBInstanceIdentifier> --allocated-storage <newStorageSize>
    
  3. Monitor the modification progress: Run the following AWS CLI command to monitor the status of the modification:
    aws rds describe-db-instances --db-instance-identifier <DBInstanceIdentifier> --query "DBInstances[0].AllocatedStorage"
    
  4. Verify the free storage space: Once the modification is complete, verify that the RDS instance now has free storage space by running the following AWS CLI command:
    aws rds describe-db-instances --db-instance-identifier <DBInstanceIdentifier> --query "DBInstances[0].FreeStorageSpace"
    
By following these steps, you can successfully remediate the misconfiguration of RDS databases not having free storage space in AWS using AWS CLI.
To remediate the misconfiguration of RDS databases not having free storage space in AWS using Python, you can follow these steps:
  1. Install Boto3: Boto3 is the AWS SDK for Python. You can install it using pip:
    pip install boto3
    
  2. Create a Python script: Create a Python script to connect to AWS using Boto3 and check for RDS instances with no free storage space. Below is an example script to get you started:
    import boto3
    
    # Initialize the RDS client
    rds_client = boto3.client('rds')
    
    # Get a list of all RDS instances
    response = rds_client.describe_db_instances()
    
    # Iterate through each RDS instance
    for db_instance in response['DBInstances']:
        db_instance_identifier = db_instance['DBInstanceIdentifier']
        free_storage_space = db_instance['FreeStorageSpace']
    
        # Check if the free storage space is 0
        if free_storage_space == 0:
            # Modify the instance to increase storage (You can modify other parameters as needed)
            rds_client.modify_db_instance(
                DBInstanceIdentifier=db_instance_identifier,
                AllocatedStorage=<new_storage_size>,  # Specify the new storage size
                ApplyImmediately=True
            )
            print(f"Modified {db_instance_identifier} to increase storage space.")
    
  3. Modify the script: Update the script with the appropriate AWS credentials and the desired new storage size for the RDS instances.
  4. Run the script: Execute the Python script to identify RDS instances with no free storage space and modify them to increase the storage.
Please ensure that you have the necessary permissions to modify RDS instances in your AWS account before running the script.

Additional Reading: