get_account_settings

get_account_settings()

Retrieves details about your account's limits and usage in an Amazon Web Services Region.

See also: AWS API Documentation

Request Syntax

response = client.get_account_settings()
Return type
dict
Returns
Response Syntax
{
    'AccountLimit': {
        'TotalCodeSize': 123,
        'CodeSizeUnzipped': 123,
        'CodeSizeZipped': 123,
        'ConcurrentExecutions': 123,
        'UnreservedConcurrentExecutions': 123
    },
    'AccountUsage': {
        'TotalCodeSize': 123,
        'FunctionCount': 123
    }
}

Response Structure

  • (dict) --
    • AccountLimit (dict) --

      Limits that are related to concurrency and code storage.

      • TotalCodeSize (integer) --

        The amount of storage space that you can use for all deployment packages and layer archives.

      • CodeSizeUnzipped (integer) --

        The maximum size of a function's deployment package and layers when they're extracted.

      • CodeSizeZipped (integer) --

        The maximum size of a deployment package when it's uploaded directly to Lambda. Use Amazon S3 for larger files.

      • ConcurrentExecutions (integer) --

        The maximum number of simultaneous function executions.

      • UnreservedConcurrentExecutions (integer) --

        The maximum number of simultaneous function executions, minus the capacity that's reserved for individual functions with PutFunctionConcurrency.

    • AccountUsage (dict) --

      The number of functions and amount of storage in use.

      • TotalCodeSize (integer) --

        The amount of storage space, in bytes, that's being used by deployment packages and layer archives.

      • FunctionCount (integer) --

        The number of Lambda functions.

Exceptions

  • Lambda.Client.exceptions.TooManyRequestsException
  • Lambda.Client.exceptions.ServiceException

Examples

This operation takes no parameters and returns details about storage and concurrency quotas in the current Region.

response = client.get_account_settings(
)

print(response)

Expected Output:

{
    'AccountLimit': {
        'CodeSizeUnzipped': 262144000,
        'CodeSizeZipped': 52428800,
        'ConcurrentExecutions': 1000,
        'TotalCodeSize': 80530636800,
        'UnreservedConcurrentExecutions': 1000,
    },
    'AccountUsage': {
        'FunctionCount': 4,
        'TotalCodeSize': 9426,
    },
    'ResponseMetadata': {
        '...': '...',
    },
}