2017/11/30 - AWS Lambda - 2 new 2 updated api methods
Changes AWS Lambda now supports the ability to set the concurrency limits for individual functions, and increasing memory to 3008 GB.
Removes concurrent execution limits from this function.
See also: AWS API Documentation
Request Syntax
client.delete_function_concurrency( FunctionName='string' )
string
[REQUIRED]
The name of the function you are removing concurrent execution limits from.
None
Sets a limit on the number of concurrent executions available to this function. It is a subset of your account's total concurrent execution limit per region. Note that Lambda automatically reserves a buffer of 100 concurrent executions for functions without any reserved concurrency limit. This means if your account limit is 1000, you have a total of 900 available to allocate to individual functions.
See also: AWS API Documentation
Request Syntax
client.put_function_concurrency( FunctionName='string', ReservedConcurrentExecutions=123 )
string
[REQUIRED]
The name of the function you are setting concurrent execution limits on.
integer
[REQUIRED]
The concurrent execution limit reserved for this function.
dict
Response Syntax
{ 'ReservedConcurrentExecutions': 123 }
Response Structure
(dict) --
ReservedConcurrentExecutions (integer) --
The number of concurrent executions reserved for this function.
{'AccountLimit': {'UnreservedConcurrentExecutions': 'integer'}}
Returns a customer's account settings.
You can use this operation to retrieve Lambda limits information, such as code size and concurrency limits. For more information about limits, see AWS Lambda Limits . You can also retrieve resource usage statistics, such as code storage usage and function count.
See also: AWS API Documentation
Request Syntax
client.get_account_settings()
dict
Response Syntax
{ 'AccountLimit': { 'TotalCodeSize': 123, 'CodeSizeUnzipped': 123, 'CodeSizeZipped': 123, 'ConcurrentExecutions': 123, 'UnreservedConcurrentExecutions': 123 }, 'AccountUsage': { 'TotalCodeSize': 123, 'FunctionCount': 123 } }
Response Structure
(dict) --
AccountLimit (dict) --
Provides limits of code size and concurrency associated with the current account and region.
TotalCodeSize (integer) --
Maximum size, in bytes, of a code package you can upload per region. The default size is 75 GB.
CodeSizeUnzipped (integer) --
Size, in bytes, of code/dependencies that you can zip into a deployment package (uncompressed zip/jar size) for uploading. The default limit is 250 MB.
CodeSizeZipped (integer) --
Size, in bytes, of a single zipped code/dependencies package you can upload for your Lambda function(.zip/.jar file). Try using Amazon S3 for uploading larger files. Default limit is 50 MB.
ConcurrentExecutions (integer) --
Number of simultaneous executions of your function per region. For more information or to request a limit increase for concurrent executions, see Lambda Function Concurrent Executions . The default limit is 1000.
UnreservedConcurrentExecutions (integer) --
The number of concurrent executions available to functions that do not have concurrency limits set.
AccountUsage (dict) --
Provides code size usage and function count associated with the current account and region.
TotalCodeSize (integer) --
Total size, in bytes, of the account's deployment packages per region.
FunctionCount (integer) --
The number of your account's existing functions per region.
{'Concurrency': {'ReservedConcurrentExecutions': 'integer'}}
Returns the configuration information of the Lambda function and a presigned URL link to the .zip file you uploaded with CreateFunction so you can download the .zip file. Note that the URL is valid for up to 10 minutes. The configuration information is the same information you provided as parameters when uploading the function.
Using the optional Qualifier parameter, you can specify a specific function version for which you want this information. If you don't specify this parameter, the API uses unqualified function ARN which return information about the $LATEST version of the Lambda function. For more information, see AWS Lambda Function Versioning and Aliases .
This operation requires permission for the lambda:GetFunction action.
See also: AWS API Documentation
Request Syntax
client.get_function( FunctionName='string', Qualifier='string' )
string
[REQUIRED]
The Lambda function name.
You can specify a function name (for example, Thumbnail ) or you can specify Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail ). AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail ). Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 characters in length.
string
Use this optional parameter to specify a function version or an alias name. If you specify function version, the API uses qualified function ARN for the request and returns information about the specific Lambda function version. If you specify an alias name, the API uses the alias ARN and returns information about the function version to which the alias points. If you don't provide this parameter, the API uses unqualified function ARN and returns information about the $LATEST version of the Lambda function.
dict
Response Syntax
{ 'Configuration': { 'FunctionName': 'string', 'FunctionArn': 'string', 'Runtime': 'nodejs'|'nodejs4.3'|'nodejs6.10'|'java8'|'python2.7'|'python3.6'|'dotnetcore1.0'|'nodejs4.3-edge', 'Role': 'string', 'Handler': 'string', 'CodeSize': 123, 'Description': 'string', 'Timeout': 123, 'MemorySize': 123, 'LastModified': 'string', 'CodeSha256': 'string', 'Version': 'string', 'VpcConfig': { 'SubnetIds': [ 'string', ], 'SecurityGroupIds': [ 'string', ], 'VpcId': 'string' }, 'DeadLetterConfig': { 'TargetArn': 'string' }, 'Environment': { 'Variables': { 'string': 'string' }, 'Error': { 'ErrorCode': 'string', 'Message': 'string' } }, 'KMSKeyArn': 'string', 'TracingConfig': { 'Mode': 'Active'|'PassThrough' }, 'MasterArn': 'string' }, 'Code': { 'RepositoryType': 'string', 'Location': 'string' }, 'Tags': { 'string': 'string' }, 'Concurrency': { 'ReservedConcurrentExecutions': 123 } }
Response Structure
(dict) --
This response contains the object for the Lambda function location (see FunctionCodeLocation .
Configuration (dict) --
A complex type that describes function metadata.
FunctionName (string) --
The name of the function. Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 characters in length.
FunctionArn (string) --
The Amazon Resource Name (ARN) assigned to the function.
Runtime (string) --
The runtime environment for the Lambda function.
Role (string) --
The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS) resources.
Handler (string) --
The function Lambda calls to begin executing your function.
CodeSize (integer) --
The size, in bytes, of the function .zip file you uploaded.
Description (string) --
The user-provided description.
Timeout (integer) --
The function execution time at which Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.
MemorySize (integer) --
The memory size, in MB, you configured for the function. Must be a multiple of 64 MB.
LastModified (string) --
The time stamp of the last time you updated the function. The time stamp is conveyed as a string complying with ISO-8601 in this way YYYY-MM-DDThh:mm:ssTZD (e.g., 1997-07-16T19:20:30+01:00). For more information, see Date and Time Formats .
CodeSha256 (string) --
It is the SHA256 hash of your function deployment package.
Version (string) --
The version of the Lambda function.
VpcConfig (dict) --
VPC configuration associated with your Lambda function.
SubnetIds (list) --
A list of subnet IDs associated with the Lambda function.
(string) --
SecurityGroupIds (list) --
A list of security group IDs associated with the Lambda function.
(string) --
VpcId (string) --
The VPC ID associated with you Lambda function.
DeadLetterConfig (dict) --
The parent object that contains the target ARN (Amazon Resource Name) of an Amazon SQS queue or Amazon SNS topic.
TargetArn (string) --
The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic you specify as your Dead Letter Queue (DLQ).
Environment (dict) --
The parent object that contains your environment's configuration settings.
Variables (dict) --
The key-value pairs returned that represent your environment's configuration settings or error information.
(string) --
(string) --
Error (dict) --
The parent object that contains error information associated with your configuration settings.
ErrorCode (string) --
The error code returned by the environment error object.
Message (string) --
The message returned by the environment error object.
KMSKeyArn (string) --
The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's environment variables. If empty, it means you are using the AWS Lambda default service key.
TracingConfig (dict) --
The parent object that contains your function's tracing settings.
Mode (string) --
The tracing mode associated with your Lambda function.
MasterArn (string) --
Returns the ARN (Amazon Resource Name) of the master function.
Code (dict) --
The object for the Lambda function location.
RepositoryType (string) --
The repository from which you can download the function.
Location (string) --
The presigned URL you can use to download the function's .zip file that you previously uploaded. The URL is valid for up to 10 minutes.
Tags (dict) --
Returns the list of tags associated with the function.
(string) --
(string) --
Concurrency (dict) --
The concurrent execution limit set for this function.
ReservedConcurrentExecutions (integer) --
The number of concurrent executions reserved for this function.