Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Enable DynamoDB Table Auto Scaling Rule

This rule ensures that DynamoDB table auto scaling is enabled for optimal performance.

RuleDynamoDB table auto scaling should be enabled
FrameworkCISA-cyber-essentials
Severity
High

DynamoDB Table Auto Scaling for CISA Cyber Essentials

Description

DynamoDB is a fully managed NoSQL database service provided by AWS. It allows users to create tables to store and retrieve any amount of data and serve any level of request traffic. DynamoDB offers the capability to automatically adjust provisioned capacity based on the application's demand with the help of DynamoDB Table Auto Scaling.

Auto Scaling is an important feature that helps in optimizing DynamoDB costs and performance. By enabling auto scaling, the provisioning of read and write capacity units is automatically adjusted based on the consumed capacity of the table, ensuring that the application never runs out of capacity or over-provisions unutilized capacity.

Enabling DynamoDB Table Auto Scaling for CISA Cyber Essentials ensures that the table can efficiently handle varying levels of read and write requests, and it prevents any performance degradation or resource wastage.

Troubleshooting Steps

  • If you are experiencing throughput issues with your DynamoDB table, check if auto scaling is enabled.
  • Check the CloudWatch Alarms associated with the table to understand the scaling actions taken.
  • Review the metric graphs in CloudWatch to analyze the consumed capacity and provisioned capacity of the table.
  • Ensure that the scaling policies are correctly configured for the table.
  • Monitor any capacity-related errors in the application logs.

Necessary Codes

No specific code is required to enable DynamoDB Table Auto Scaling. It can be enabled directly through the AWS Management Console, AWS CLI, or AWS SDKs.

Step-by-Step Guide for Remediation

To enable auto scaling for a DynamoDB table, follow the step-by-step guide below:

  1. 1.

    AWS Management Console:

    • Sign in to the AWS Management Console.
    • Open the DynamoDB service.
    • Locate and select the desired DynamoDB table (in this case, CISA-cyber-essentials).
    • Click on the "Capacity" tab.
    • Under "Auto Scaling", click the "Manage auto scaling" button.
    • Click on "Add scaling policy".
    • Configure the scaling policy by setting the desired target utilization and the minimum and maximum capacity values.
    • Click on "Save" to enable auto scaling for the table.
  2. 2.

    AWS CLI:

    • Open the AWS CLI.

    • Run the following command to enable auto scaling for the DynamoDB table:

      aws application-autoscaling register-scalable-target --service-namespace dynamodb --scalable-dimension dynamodb:table:ReadCapacityUnits --resource-id table/<table-name> --min-capacity <min-capacity> --max-capacity <max-capacity>
      

      Ensure you replace

      <table-name>
      with the actual name of the table and provide appropriate values for
      <min-capacity>
      and
      <max-capacity>
      .

    • Run the following command to create a scaling policy:

      aws application-autoscaling put-scaling-policy --policy-name <policy-name> --service-namespace dynamodb --resource-id table/<table-name> --scalable-dimension dynamodb:table:ReadCapacityUnits --policy-type TargetTrackingScaling --target-tracking-scaling-policy-configuration file://config.json
      

      Replace

      <policy-name>
      with the name for your policy and
      <table-name>
      with the actual name of the table.

  3. 3.

    AWS SDKs:

    • Use the SDK for your preferred programming language to configure auto scaling for the DynamoDB table. Refer to the AWS documentation for the SDK you are using for detailed instructions.

Conclusion

Enabling DynamoDB Table Auto Scaling for CISA Cyber Essentials ensures that the table can dynamically adjust its provisioned capacity based on the application's demand, preventing both resource wastage and performance degradation. It optimizes cost and allows the application to handle varying levels of read and write requests efficiently. Regular monitoring and adjustment of scaling policies are recommended to ensure optimal performance.

Is your System Free of Underlying Vulnerabilities?
Find Out Now