Amazon DynamoDB

2016/03/02 - Amazon DynamoDB - 1 new api methods

DescribeLimits (new) Link ΒΆ

Returns the current provisioned-capacity limits for your AWS account in a region, both for the region as a whole and for any one DynamoDB table you create there.

When you establish an AWS account, the account has initial limits on the maximum Read- and Write-Capacity Units (RCUs and WCUs) that you can provision across all your DynamoDB tables in a given region, and also per-table limits that apply when you create a table there. Although you can increase these limits by filing a Case at AWS Support Center, obtaining the increase is not instantaneous. The DescribeLimits API lets you write code to compare the capacity you are currently using to those limits imposed by your account so you have enough time to apply for an increase before you hit a limit. For example, you could use one of the AWS SDKs to do the following:

  • Call DescribeLimits to obtain the current account limits on provisioned capacity in a region.

  • Call ListTables to obtain a list of all your DynamoDB tables there.

  • Loop over the tables, calling DescribeTable on each. Sum the capacity provisioned for each table and all its global secondary indexes across all the tables, while also keeping track of the table or global secondary index with the largest provisioned read capacity, and the one with the largest provisioned write capacity.

  • Report the account limits returned by DescribeLimits as compared to the current provisioned capacity levels for the account as a whole, and for the highest current per-table provisioning.

This will let you see whether you are getting close to your account-level limits. See Limits in DynamoDB for a code example written in Python.

Request Syntax

client.describe_limits()
rtype:

dict

returns:

Response Syntax

{
    'AccountMaxReadCapacityUnits': 123,
    'AccountMaxWriteCapacityUnits': 123,
    'TableMaxReadCapacityUnits': 123,
    'TableMaxWriteCapacityUnits': 123
}

Response Structure

  • (dict) --

    Represents the output of a DescribeLimits operation.

    • AccountMaxReadCapacityUnits (integer) --

      The maximum total Read-Capacity Units (RCUs) that your account allows you to provision across all your tables in this region.

    • AccountMaxWriteCapacityUnits (integer) --

      The maximum total Write-Capacity Units (WCUs) that your account allows you to provision across all your tables in this region.

    • TableMaxReadCapacityUnits (integer) --

      The maximum Read-Capacity Units (RCUs) that your account allows you to provision for a new table you are creating in this region, including the RCUs provisioned for its global secondary indexes (GSIs).

    • TableMaxWriteCapacityUnits (integer) --

      The maximum Write-Capacity Units (WCUs) that your account allows you to provision for a new table you are creating in this region, including the WCUs provisioned for its global secondary indexes (GSIs).