2018/11/29 - AWS Lambda - 8 new 8 updated api methods
Changes AWS Lambda now supports Lambda Layers and Ruby as a runtime. Lambda Layers are a new type of artifact that contains arbitrary code and data, and may be referenced by zero, one, or more functions at the same time. You can also now develop your AWS Lambda function code using the Ruby programming language.
Returns the permission policy for a layer version. For more information, see AddLayerVersionPermission .
See also: AWS API Documentation
Request Syntax
client.get_layer_version_policy( LayerName='string', VersionNumber=123 )
string
[REQUIRED]
The name of the layer.
integer
[REQUIRED]
The version number.
dict
Response Syntax
{ 'Policy': 'string', 'RevisionId': 'string' }
Response Structure
(dict) --
Policy (string) --
The policy document.
RevisionId (string) --
A unique identifier for the current revision of the policy.
Lists function layers and shows information about the latest version of each. Specify a runtime identifier to list only layers that indicate that they're compatible with that runtime.
See also: AWS API Documentation
Request Syntax
client.list_layers( CompatibleRuntime='nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', Marker='string', MaxItems=123 )
string
A runtime identifier. For example, go1.x .
string
A pagination token returned by a previous call.
integer
The maximum number of layers to return.
dict
Response Syntax
{ 'NextMarker': 'string', 'Layers': [ { 'LayerName': 'string', 'LayerArn': 'string', 'LatestMatchingVersion': { 'LayerVersionArn': 'string', 'Version': 123, 'Description': 'string', 'CreatedDate': 'string', 'CompatibleRuntimes': [ 'nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', ], 'LicenseInfo': 'string' } }, ] }
Response Structure
(dict) --
NextMarker (string) --
A pagination token returned when the response doesn't contain all layers.
Layers (list) --
A list of function layers.
(dict) --
Details about a function layer.
LayerName (string) --
The name of the layer.
LayerArn (string) --
The Amazon Resource Name (ARN) of the function layer.
LatestMatchingVersion (dict) --
The newest version of the layer.
LayerVersionArn (string) --
The ARN of the layer version.
Version (integer) --
The version number.
Description (string) --
The description of the version.
CreatedDate (string) --
The date that the version was created, in ISO 8601 format. For example, 2018-11-27T15:10:45.123+0000 .
CompatibleRuntimes (list) --
The layer's compatible runtimes.
(string) --
LicenseInfo (string) --
The layer's open-source license.
Adds permissions to the resource-based policy of a version of a function layer. Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all AWS accounts, or all accounts in an organization.
To revoke permission, call RemoveLayerVersionPermission with the statement ID that you specified when you added it.
See also: AWS API Documentation
Request Syntax
client.add_layer_version_permission( LayerName='string', VersionNumber=123, StatementId='string', Action='string', Principal='string', OrganizationId='string', RevisionId='string' )
string
[REQUIRED]
The name of the layer.
integer
[REQUIRED]
The version number.
string
[REQUIRED]
An identifier that distinguishes the policy from others on the same layer version.
string
[REQUIRED]
The API action that grants access to the layer. For example, lambda:GetLayerVersion .
string
[REQUIRED]
An account ID, or * to grant permission to all AWS accounts.
string
With the principal set to * , grant permission to all accounts in the specified organization.
string
Only update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it.
dict
Response Syntax
{ 'Statement': 'string', 'RevisionId': 'string' }
Response Structure
(dict) --
Statement (string) --
The permission statement.
RevisionId (string) --
A unique identifier for the current revision of the policy.
Removes a statement from the permissions policy for a layer version. For more information, see AddLayerVersionPermission .
See also: AWS API Documentation
Request Syntax
client.remove_layer_version_permission( LayerName='string', VersionNumber=123, StatementId='string', RevisionId='string' )
string
[REQUIRED]
The name of the layer.
integer
[REQUIRED]
The version number.
string
[REQUIRED]
The identifier that was specified when the statement was added.
string
Only update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it.
None
Creates a function layer from a ZIP archive. Each time you call PublishLayerVersion with the same version name, a new version is created.
Add layers to your function with CreateFunction or UpdateFunctionConfiguration .
See also: AWS API Documentation
Request Syntax
client.publish_layer_version( LayerName='string', Description='string', Content={ 'S3Bucket': 'string', 'S3Key': 'string', 'S3ObjectVersion': 'string', 'ZipFile': b'bytes' }, CompatibleRuntimes=[ 'nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', ], LicenseInfo='string' )
string
[REQUIRED]
The name of the layer.
string
The description of the version.
dict
[REQUIRED]
The function layer archive.
S3Bucket (string) --
The Amazon S3 bucket of the layer archive.
S3Key (string) --
The Amazon S3 key of the layer archive.
S3ObjectVersion (string) --
For versioned objects, the version of the layer archive object to use.
ZipFile (bytes) --
The base64-encoded contents of the layer archive. AWS SDK and AWS CLI clients handle the encoding for you.
list
A list of compatible function runtimes . Used for filtering with ListLayers and ListLayerVersions .
(string) --
string
The layer's software license. It can be any of the following:
An SPDX license identifier . For example, MIT .
The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT .
The full text of the license.
dict
Response Syntax
{ 'Content': { 'Location': 'string', 'CodeSha256': 'string', 'CodeSize': 123 }, 'LayerArn': 'string', 'LayerVersionArn': 'string', 'Description': 'string', 'CreatedDate': 'string', 'Version': 123, 'CompatibleRuntimes': [ 'nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', ], 'LicenseInfo': 'string' }
Response Structure
(dict) --
Content (dict) --
Details about the layer version.
Location (string) --
A link to the layer archive in Amazon S3 that is valid for 10 minutes.
CodeSha256 (string) --
The SHA-256 hash of the layer archive.
CodeSize (integer) --
The size of the layer archive in bytes.
LayerArn (string) --
The Amazon Resource Name (ARN) of the function layer.
LayerVersionArn (string) --
The ARN of the layer version.
Description (string) --
The description of the version.
CreatedDate (string) --
The date that the layer version was created, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
Version (integer) --
The version number.
CompatibleRuntimes (list) --
The layer's compatible runtimes.
(string) --
LicenseInfo (string) --
The layer's software license.
Lists the versions of a function layer. Versions that have been deleted aren't listed. Specify a runtime identifier to list only versions that indicate that they're compatible with that runtime.
See also: AWS API Documentation
Request Syntax
client.list_layer_versions( CompatibleRuntime='nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', LayerName='string', Marker='string', MaxItems=123 )
string
A runtime identifier. For example, go1.x .
string
[REQUIRED]
The name of the layer.
string
A pagination token returned by a previous call.
integer
The maximum number of versions to return.
dict
Response Syntax
{ 'NextMarker': 'string', 'LayerVersions': [ { 'LayerVersionArn': 'string', 'Version': 123, 'Description': 'string', 'CreatedDate': 'string', 'CompatibleRuntimes': [ 'nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', ], 'LicenseInfo': 'string' }, ] }
Response Structure
(dict) --
NextMarker (string) --
A pagination token returned when the response doesn't contain all versions.
LayerVersions (list) --
A list of versions.
(dict) --
Details about a layer version.
LayerVersionArn (string) --
The ARN of the layer version.
Version (integer) --
The version number.
Description (string) --
The description of the version.
CreatedDate (string) --
The date that the version was created, in ISO 8601 format. For example, 2018-11-27T15:10:45.123+0000 .
CompatibleRuntimes (list) --
The layer's compatible runtimes.
(string) --
LicenseInfo (string) --
The layer's open-source license.
Returns information about a version of a function layer, with a link to download the layer archive that's valid for 10 minutes.
See also: AWS API Documentation
Request Syntax
client.get_layer_version( LayerName='string', VersionNumber=123 )
string
[REQUIRED]
The name of the layer.
integer
[REQUIRED]
The version number.
dict
Response Syntax
{ 'Content': { 'Location': 'string', 'CodeSha256': 'string', 'CodeSize': 123 }, 'LayerArn': 'string', 'LayerVersionArn': 'string', 'Description': 'string', 'CreatedDate': 'string', 'Version': 123, 'CompatibleRuntimes': [ 'nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', ], 'LicenseInfo': 'string' }
Response Structure
(dict) --
Content (dict) --
Details about the layer version.
Location (string) --
A link to the layer archive in Amazon S3 that is valid for 10 minutes.
CodeSha256 (string) --
The SHA-256 hash of the layer archive.
CodeSize (integer) --
The size of the layer archive in bytes.
LayerArn (string) --
The Amazon Resource Name (ARN) of the function layer.
LayerVersionArn (string) --
The ARN of the layer version.
Description (string) --
The description of the version.
CreatedDate (string) --
The date that the layer version was created, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
Version (integer) --
The version number.
CompatibleRuntimes (list) --
The layer's compatible runtimes.
(string) --
LicenseInfo (string) --
The layer's software license.
Deletes a version of a function layer. Deleted versions can no longer be viewed or added to functions. However, a copy of the version remains in Lambda until no functions refer to it.
See also: AWS API Documentation
Request Syntax
client.delete_layer_version( LayerName='string', VersionNumber=123 )
string
[REQUIRED]
The name of the layer.
integer
[REQUIRED]
The version number.
None
{'Layers': ['string'], 'Runtime': ['provided', 'ruby2.5']}Response
{'Layers': [{'Arn': 'string', 'CodeSize': 'long'}], 'Runtime': ['provided', 'ruby2.5']}
Creates a new Lambda function. The function configuration is created from the request parameters, and the code for the function is provided by a .zip file. The function name is case-sensitive.
This operation requires permission for the lambda:CreateFunction action.
See also: AWS API Documentation
Request Syntax
client.create_function( FunctionName='string', Runtime='nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', Role='string', Handler='string', Code={ 'ZipFile': b'bytes', 'S3Bucket': 'string', 'S3Key': 'string', 'S3ObjectVersion': 'string' }, Description='string', Timeout=123, MemorySize=123, Publish=True|False, VpcConfig={ 'SubnetIds': [ 'string', ], 'SecurityGroupIds': [ 'string', ] }, DeadLetterConfig={ 'TargetArn': 'string' }, Environment={ 'Variables': { 'string': 'string' } }, KMSKeyArn='string', TracingConfig={ 'Mode': 'Active'|'PassThrough' }, Tags={ 'string': 'string' }, Layers=[ 'string', ] )
string
[REQUIRED]
The name of the Lambda function.
Name formats
Function name - MyFunction .
Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
Partial ARN - 123456789012:function:MyFunction .
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
string
[REQUIRED]
The runtime version for the function.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the function's execution role .
string
[REQUIRED]
The name of the method within your code that Lambda calls to execute your function. For more information, see Programming Model .
dict
[REQUIRED]
The code for the function.
ZipFile (bytes) --
The base64-encoded contents of your zip file containing your deployment package. AWS SDK and AWS CLI clients handle the encoding for you.
S3Bucket (string) --
An Amazon S3 bucket in the same region as your function.
S3Key (string) --
The Amazon S3 key of the deployment package.
S3ObjectVersion (string) --
For versioned objects, the version of the deployment package object to use.
string
A description of the function.
integer
The amount of time that Lambda allows a function to run before terminating it. The default is 3 seconds. The maximum allowed value is 900 seconds.
integer
The amount of memory that your function has access to. Increasing the function's memory also increases it's CPU allocation. The default value is 128 MB. The value must be a multiple of 64 MB.
boolean
Set to true to publish the first version of the function during creation.
dict
If your Lambda function accesses resources in a VPC, you provide this parameter identifying the list of security group IDs and subnet IDs. These must belong to the same VPC. You must provide at least one security group and one subnet ID.
SubnetIds (list) --
A list of VPC subnet IDs.
(string) --
SecurityGroupIds (list) --
A list of VPC security groups IDs.
(string) --
dict
A dead letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead Letter Queues .
TargetArn (string) --
The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
dict
Environment variables that are accessible from function code during execution.
Variables (dict) --
Environment variable key-value pairs.
(string) --
(string) --
string
The ARN of the KMS key used to encrypt your function's environment variables. If not provided, AWS Lambda will use a default service key.
dict
Set Mode to Active to sample and trace a subset of incoming requests with AWS X-Ray.
Mode (string) --
The tracing mode.
dict
The list of tags (key-value pairs) assigned to the new function. For more information, see Tagging Lambda Functions in the AWS Lambda Developer Guide .
(string) --
(string) --
list
A list of function layers to add to the function's execution environment.
(string) --
dict
Response Syntax
{ 'FunctionName': 'string', 'FunctionArn': 'string', 'Runtime': 'nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', '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', 'RevisionId': 'string', 'Layers': [ { 'Arn': 'string', 'CodeSize': 123 }, ] }
Response Structure
(dict) --
A Lambda function's configuration settings.
FunctionName (string) --
The name of the function.
FunctionArn (string) --
The function's Amazon Resource Name.
Runtime (string) --
The runtime environment for the Lambda function.
Role (string) --
The function's execution role.
Handler (string) --
The function Lambda calls to begin executing your function.
CodeSize (integer) --
The size of the function's deployment package in bytes.
Description (string) --
The function's description.
Timeout (integer) --
The amount of time that Lambda allows a function to run before terminating it.
MemorySize (integer) --
The memory allocated to the function
LastModified (string) --
The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
CodeSha256 (string) --
The SHA256 hash of the function's deployment package.
Version (string) --
The version of the Lambda function.
VpcConfig (dict) --
The function's networking configuration.
SubnetIds (list) --
A list of VPC subnet IDs.
(string) --
SecurityGroupIds (list) --
A list of VPC security groups IDs.
(string) --
VpcId (string) --
The ID of the VPC.
DeadLetterConfig (dict) --
The function's dead letter queue.
TargetArn (string) --
The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
Environment (dict) --
The function's environment variables.
Variables (dict) --
Environment variable key-value pairs.
(string) --
(string) --
Error (dict) --
Error messages for environment variables that could not be applied.
ErrorCode (string) --
The error code.
Message (string) --
The error message.
KMSKeyArn (string) --
The KMS key used to encrypt the function's environment variables. Only returned if you've configured a customer managed CMK.
TracingConfig (dict) --
The function's AWS X-Ray tracing configuration.
Mode (string) --
The tracing mode.
MasterArn (string) --
The ARN of the master function.
RevisionId (string) --
Represents the latest updated revision of the function or alias.
Layers (list) --
A list of function layers .
(dict) --
A function layer.
Arn (string) --
The Amazon Resource Name (ARN) of the function layer.
CodeSize (integer) --
The size of the layer archive in bytes.
{'Configuration': {'Layers': [{'Arn': 'string', 'CodeSize': 'long'}], 'Runtime': ['provided', 'ruby2.5']}}
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.
Use the Qualifier parameter to retrieve a published version of the function. Otherwise, returns the unpublished version ($LATEST ). 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 name of the Lambda function.
Name formats
Function name - MyFunction .
Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
Partial ARN - 123456789012:function:MyFunction .
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
string
Specify a version or alias to get details about a published version of the function.
dict
Response Syntax
{ 'Configuration': { 'FunctionName': 'string', 'FunctionArn': 'string', 'Runtime': 'nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', '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', 'RevisionId': 'string', 'Layers': [ { 'Arn': 'string', 'CodeSize': 123 }, ] }, '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) --
The function's configuration.
FunctionName (string) --
The name of the function.
FunctionArn (string) --
The function's Amazon Resource Name.
Runtime (string) --
The runtime environment for the Lambda function.
Role (string) --
The function's execution role.
Handler (string) --
The function Lambda calls to begin executing your function.
CodeSize (integer) --
The size of the function's deployment package in bytes.
Description (string) --
The function's description.
Timeout (integer) --
The amount of time that Lambda allows a function to run before terminating it.
MemorySize (integer) --
The memory allocated to the function
LastModified (string) --
The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
CodeSha256 (string) --
The SHA256 hash of the function's deployment package.
Version (string) --
The version of the Lambda function.
VpcConfig (dict) --
The function's networking configuration.
SubnetIds (list) --
A list of VPC subnet IDs.
(string) --
SecurityGroupIds (list) --
A list of VPC security groups IDs.
(string) --
VpcId (string) --
The ID of the VPC.
DeadLetterConfig (dict) --
The function's dead letter queue.
TargetArn (string) --
The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
Environment (dict) --
The function's environment variables.
Variables (dict) --
Environment variable key-value pairs.
(string) --
(string) --
Error (dict) --
Error messages for environment variables that could not be applied.
ErrorCode (string) --
The error code.
Message (string) --
The error message.
KMSKeyArn (string) --
The KMS key used to encrypt the function's environment variables. Only returned if you've configured a customer managed CMK.
TracingConfig (dict) --
The function's AWS X-Ray tracing configuration.
Mode (string) --
The tracing mode.
MasterArn (string) --
The ARN of the master function.
RevisionId (string) --
Represents the latest updated revision of the function or alias.
Layers (list) --
A list of function layers .
(dict) --
A function layer.
Arn (string) --
The Amazon Resource Name (ARN) of the function layer.
CodeSize (integer) --
The size of the layer archive in bytes.
Code (dict) --
The function's code.
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. For more information, see Tagging Lambda Functions in the AWS Lambda Developer Guide .
(string) --
(string) --
Concurrency (dict) --
The concurrent execution limit set for this function. For more information, see Managing Concurrency .
ReservedConcurrentExecutions (integer) --
The number of concurrent executions reserved for this function. For more information, see Managing Concurrency .
{'Layers': [{'Arn': 'string', 'CodeSize': 'long'}], 'Runtime': ['provided', 'ruby2.5']}
Returns the configuration information of the Lambda function. This the same information you provided as parameters when uploading the function by using CreateFunction .
If you are using the versioning feature, you can retrieve this information for a specific function version by using the optional Qualifier parameter and specifying the function version or alias that points to it. If you don't provide it, the API returns information about the $LATEST version of the function. For more information about versioning, see AWS Lambda Function Versioning and Aliases .
This operation requires permission for the lambda:GetFunctionConfiguration operation.
See also: AWS API Documentation
Request Syntax
client.get_function_configuration( FunctionName='string', Qualifier='string' )
string
[REQUIRED]
The name of the Lambda function.
Name formats
Function name - MyFunction .
Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
Partial ARN - 123456789012:function:MyFunction .
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
string
Specify a version or alias to get details about a published version of the function.
dict
Response Syntax
{ 'FunctionName': 'string', 'FunctionArn': 'string', 'Runtime': 'nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', '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', 'RevisionId': 'string', 'Layers': [ { 'Arn': 'string', 'CodeSize': 123 }, ] }
Response Structure
(dict) --
A Lambda function's configuration settings.
FunctionName (string) --
The name of the function.
FunctionArn (string) --
The function's Amazon Resource Name.
Runtime (string) --
The runtime environment for the Lambda function.
Role (string) --
The function's execution role.
Handler (string) --
The function Lambda calls to begin executing your function.
CodeSize (integer) --
The size of the function's deployment package in bytes.
Description (string) --
The function's description.
Timeout (integer) --
The amount of time that Lambda allows a function to run before terminating it.
MemorySize (integer) --
The memory allocated to the function
LastModified (string) --
The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
CodeSha256 (string) --
The SHA256 hash of the function's deployment package.
Version (string) --
The version of the Lambda function.
VpcConfig (dict) --
The function's networking configuration.
SubnetIds (list) --
A list of VPC subnet IDs.
(string) --
SecurityGroupIds (list) --
A list of VPC security groups IDs.
(string) --
VpcId (string) --
The ID of the VPC.
DeadLetterConfig (dict) --
The function's dead letter queue.
TargetArn (string) --
The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
Environment (dict) --
The function's environment variables.
Variables (dict) --
Environment variable key-value pairs.
(string) --
(string) --
Error (dict) --
Error messages for environment variables that could not be applied.
ErrorCode (string) --
The error code.
Message (string) --
The error message.
KMSKeyArn (string) --
The KMS key used to encrypt the function's environment variables. Only returned if you've configured a customer managed CMK.
TracingConfig (dict) --
The function's AWS X-Ray tracing configuration.
Mode (string) --
The tracing mode.
MasterArn (string) --
The ARN of the master function.
RevisionId (string) --
Represents the latest updated revision of the function or alias.
Layers (list) --
A list of function layers .
(dict) --
A function layer.
Arn (string) --
The Amazon Resource Name (ARN) of the function layer.
CodeSize (integer) --
The size of the layer archive in bytes.
{'Functions': {'Layers': [{'Arn': 'string', 'CodeSize': 'long'}], 'Runtime': ['provided', 'ruby2.5']}}
Returns a list of your Lambda functions. For each function, the response includes the function configuration information. You must use GetFunction to retrieve the code for your function.
This operation requires permission for the lambda:ListFunctions action.
If you are using the versioning feature, you can list all of your functions or only $LATEST versions. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases .
See also: AWS API Documentation
Request Syntax
client.list_functions( MasterRegion='string', FunctionVersion='ALL', Marker='string', MaxItems=123 )
string
Specify a region (e.g. us-east-2 ) to only list functions that were created in that region, or ALL to include functions replicated from any region. If specified, you also must specify the FunctionVersion .
string
Set to ALL to list all published versions. If not specified, only the latest unpublished version ARN is returned.
string
Optional string. An opaque pagination token returned from a previous ListFunctions operation. If present, indicates where to continue the listing.
integer
Optional integer. Specifies the maximum number of AWS Lambda functions to return in response. This parameter value must be greater than 0. The absolute maximum of AWS Lambda functions that can be returned is 50.
dict
Response Syntax
{ 'NextMarker': 'string', 'Functions': [ { 'FunctionName': 'string', 'FunctionArn': 'string', 'Runtime': 'nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', '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', 'RevisionId': 'string', 'Layers': [ { 'Arn': 'string', 'CodeSize': 123 }, ] }, ] }
Response Structure
(dict) --
A list of Lambda functions.
NextMarker (string) --
A string, present if there are more functions.
Functions (list) --
A list of Lambda functions.
(dict) --
A Lambda function's configuration settings.
FunctionName (string) --
The name of the function.
FunctionArn (string) --
The function's Amazon Resource Name.
Runtime (string) --
The runtime environment for the Lambda function.
Role (string) --
The function's execution role.
Handler (string) --
The function Lambda calls to begin executing your function.
CodeSize (integer) --
The size of the function's deployment package in bytes.
Description (string) --
The function's description.
Timeout (integer) --
The amount of time that Lambda allows a function to run before terminating it.
MemorySize (integer) --
The memory allocated to the function
LastModified (string) --
The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
CodeSha256 (string) --
The SHA256 hash of the function's deployment package.
Version (string) --
The version of the Lambda function.
VpcConfig (dict) --
The function's networking configuration.
SubnetIds (list) --
A list of VPC subnet IDs.
(string) --
SecurityGroupIds (list) --
A list of VPC security groups IDs.
(string) --
VpcId (string) --
The ID of the VPC.
DeadLetterConfig (dict) --
The function's dead letter queue.
TargetArn (string) --
The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
Environment (dict) --
The function's environment variables.
Variables (dict) --
Environment variable key-value pairs.
(string) --
(string) --
Error (dict) --
Error messages for environment variables that could not be applied.
ErrorCode (string) --
The error code.
Message (string) --
The error message.
KMSKeyArn (string) --
The KMS key used to encrypt the function's environment variables. Only returned if you've configured a customer managed CMK.
TracingConfig (dict) --
The function's AWS X-Ray tracing configuration.
Mode (string) --
The tracing mode.
MasterArn (string) --
The ARN of the master function.
RevisionId (string) --
Represents the latest updated revision of the function or alias.
Layers (list) --
A list of function layers .
(dict) --
A function layer.
Arn (string) --
The Amazon Resource Name (ARN) of the function layer.
CodeSize (integer) --
The size of the layer archive in bytes.
{'Versions': {'Layers': [{'Arn': 'string', 'CodeSize': 'long'}], 'Runtime': ['provided', 'ruby2.5']}}
Lists all versions of a function. For information about versioning, see AWS Lambda Function Versioning and Aliases .
See also: AWS API Documentation
Request Syntax
client.list_versions_by_function( FunctionName='string', Marker='string', MaxItems=123 )
string
[REQUIRED]
The name of the lambda function.
Name formats
Function name - MyFunction .
Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
Partial ARN - 123456789012:function:MyFunction .
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
string
Optional string. An opaque pagination token returned from a previous ListVersionsByFunction operation. If present, indicates where to continue the listing.
integer
Optional integer. Specifies the maximum number of AWS Lambda function versions to return in response. This parameter value must be greater than 0.
dict
Response Syntax
{ 'NextMarker': 'string', 'Versions': [ { 'FunctionName': 'string', 'FunctionArn': 'string', 'Runtime': 'nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', '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', 'RevisionId': 'string', 'Layers': [ { 'Arn': 'string', 'CodeSize': 123 }, ] }, ] }
Response Structure
(dict) --
NextMarker (string) --
A string, present if there are more function versions.
Versions (list) --
A list of Lambda function versions.
(dict) --
A Lambda function's configuration settings.
FunctionName (string) --
The name of the function.
FunctionArn (string) --
The function's Amazon Resource Name.
Runtime (string) --
The runtime environment for the Lambda function.
Role (string) --
The function's execution role.
Handler (string) --
The function Lambda calls to begin executing your function.
CodeSize (integer) --
The size of the function's deployment package in bytes.
Description (string) --
The function's description.
Timeout (integer) --
The amount of time that Lambda allows a function to run before terminating it.
MemorySize (integer) --
The memory allocated to the function
LastModified (string) --
The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
CodeSha256 (string) --
The SHA256 hash of the function's deployment package.
Version (string) --
The version of the Lambda function.
VpcConfig (dict) --
The function's networking configuration.
SubnetIds (list) --
A list of VPC subnet IDs.
(string) --
SecurityGroupIds (list) --
A list of VPC security groups IDs.
(string) --
VpcId (string) --
The ID of the VPC.
DeadLetterConfig (dict) --
The function's dead letter queue.
TargetArn (string) --
The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
Environment (dict) --
The function's environment variables.
Variables (dict) --
Environment variable key-value pairs.
(string) --
(string) --
Error (dict) --
Error messages for environment variables that could not be applied.
ErrorCode (string) --
The error code.
Message (string) --
The error message.
KMSKeyArn (string) --
The KMS key used to encrypt the function's environment variables. Only returned if you've configured a customer managed CMK.
TracingConfig (dict) --
The function's AWS X-Ray tracing configuration.
Mode (string) --
The tracing mode.
MasterArn (string) --
The ARN of the master function.
RevisionId (string) --
Represents the latest updated revision of the function or alias.
Layers (list) --
A list of function layers .
(dict) --
A function layer.
Arn (string) --
The Amazon Resource Name (ARN) of the function layer.
CodeSize (integer) --
The size of the layer archive in bytes.
{'Layers': [{'Arn': 'string', 'CodeSize': 'long'}], 'Runtime': ['provided', 'ruby2.5']}
Publishes a version of your function from the current snapshot of $LATEST. That is, AWS Lambda takes a snapshot of the function code and configuration information from $LATEST and publishes a new version. The code and configuration cannot be modified after publication. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases .
See also: AWS API Documentation
Request Syntax
client.publish_version( FunctionName='string', CodeSha256='string', Description='string', RevisionId='string' )
string
[REQUIRED]
The name of the lambda function.
Name formats
Function name - MyFunction .
Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
Partial ARN - 123456789012:function:MyFunction .
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
string
The SHA256 hash of the deployment package you want to publish. This provides validation on the code you are publishing. If you provide this parameter, the value must match the SHA256 of the $LATEST version for the publication to succeed. You can use the DryRun parameter of UpdateFunctionCode to verify the hash value that will be returned before publishing your new version.
string
The description for the version you are publishing. If not provided, AWS Lambda copies the description from the $LATEST version.
string
An optional value you can use to ensure you are updating the latest update of the function version or alias. If the RevisionID you pass doesn't match the latest RevisionId of the function or alias, it will fail with an error message, advising you retrieve the latest function version or alias RevisionID using either GetFunction or GetAlias .
dict
Response Syntax
{ 'FunctionName': 'string', 'FunctionArn': 'string', 'Runtime': 'nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', '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', 'RevisionId': 'string', 'Layers': [ { 'Arn': 'string', 'CodeSize': 123 }, ] }
Response Structure
(dict) --
A Lambda function's configuration settings.
FunctionName (string) --
The name of the function.
FunctionArn (string) --
The function's Amazon Resource Name.
Runtime (string) --
The runtime environment for the Lambda function.
Role (string) --
The function's execution role.
Handler (string) --
The function Lambda calls to begin executing your function.
CodeSize (integer) --
The size of the function's deployment package in bytes.
Description (string) --
The function's description.
Timeout (integer) --
The amount of time that Lambda allows a function to run before terminating it.
MemorySize (integer) --
The memory allocated to the function
LastModified (string) --
The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
CodeSha256 (string) --
The SHA256 hash of the function's deployment package.
Version (string) --
The version of the Lambda function.
VpcConfig (dict) --
The function's networking configuration.
SubnetIds (list) --
A list of VPC subnet IDs.
(string) --
SecurityGroupIds (list) --
A list of VPC security groups IDs.
(string) --
VpcId (string) --
The ID of the VPC.
DeadLetterConfig (dict) --
The function's dead letter queue.
TargetArn (string) --
The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
Environment (dict) --
The function's environment variables.
Variables (dict) --
Environment variable key-value pairs.
(string) --
(string) --
Error (dict) --
Error messages for environment variables that could not be applied.
ErrorCode (string) --
The error code.
Message (string) --
The error message.
KMSKeyArn (string) --
The KMS key used to encrypt the function's environment variables. Only returned if you've configured a customer managed CMK.
TracingConfig (dict) --
The function's AWS X-Ray tracing configuration.
Mode (string) --
The tracing mode.
MasterArn (string) --
The ARN of the master function.
RevisionId (string) --
Represents the latest updated revision of the function or alias.
Layers (list) --
A list of function layers .
(dict) --
A function layer.
Arn (string) --
The Amazon Resource Name (ARN) of the function layer.
CodeSize (integer) --
The size of the layer archive in bytes.
{'Layers': [{'Arn': 'string', 'CodeSize': 'long'}], 'Runtime': ['provided', 'ruby2.5']}
Updates the code for the specified Lambda function. This operation must only be used on an existing Lambda function and cannot be used to update the function configuration.
If you are using the versioning feature, note this API will always update the $LATEST version of your Lambda function. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases .
This operation requires permission for the lambda:UpdateFunctionCode action.
See also: AWS API Documentation
Request Syntax
client.update_function_code( FunctionName='string', ZipFile=b'bytes', S3Bucket='string', S3Key='string', S3ObjectVersion='string', Publish=True|False, DryRun=True|False, RevisionId='string' )
string
[REQUIRED]
The name of the Lambda function.
Name formats
Function name - MyFunction .
Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
Partial ARN - 123456789012:function:MyFunction .
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
bytes
The contents of your zip file containing your deployment package. If you are using the web API directly, the contents of the zip file must be base64-encoded. If you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the encoding for you. For more information about creating a .zip file, see Execution Permissions .
string
Amazon S3 bucket name where the .zip file containing your deployment package is stored. This bucket must reside in the same AWS Region where you are creating the Lambda function.
string
The Amazon S3 object (the deployment package) key name you want to upload.
string
The Amazon S3 object (the deployment package) version you want to upload.
boolean
This boolean parameter can be used to request AWS Lambda to update the Lambda function and publish a version as an atomic operation.
boolean
This boolean parameter can be used to test your request to AWS Lambda to update the Lambda function and publish a version as an atomic operation. It will do all necessary computation and validation of your code but will not upload it or a publish a version. Each time this operation is invoked, the CodeSha256 hash value of the provided code will also be computed and returned in the response.
string
An optional value you can use to ensure you are updating the latest update of the function version or alias. If the RevisionID you pass doesn't match the latest RevisionId of the function or alias, it will fail with an error message, advising you to retrieve the latest function version or alias RevisionID using either using using either GetFunction or GetAlias .
dict
Response Syntax
{ 'FunctionName': 'string', 'FunctionArn': 'string', 'Runtime': 'nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', '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', 'RevisionId': 'string', 'Layers': [ { 'Arn': 'string', 'CodeSize': 123 }, ] }
Response Structure
(dict) --
A Lambda function's configuration settings.
FunctionName (string) --
The name of the function.
FunctionArn (string) --
The function's Amazon Resource Name.
Runtime (string) --
The runtime environment for the Lambda function.
Role (string) --
The function's execution role.
Handler (string) --
The function Lambda calls to begin executing your function.
CodeSize (integer) --
The size of the function's deployment package in bytes.
Description (string) --
The function's description.
Timeout (integer) --
The amount of time that Lambda allows a function to run before terminating it.
MemorySize (integer) --
The memory allocated to the function
LastModified (string) --
The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
CodeSha256 (string) --
The SHA256 hash of the function's deployment package.
Version (string) --
The version of the Lambda function.
VpcConfig (dict) --
The function's networking configuration.
SubnetIds (list) --
A list of VPC subnet IDs.
(string) --
SecurityGroupIds (list) --
A list of VPC security groups IDs.
(string) --
VpcId (string) --
The ID of the VPC.
DeadLetterConfig (dict) --
The function's dead letter queue.
TargetArn (string) --
The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
Environment (dict) --
The function's environment variables.
Variables (dict) --
Environment variable key-value pairs.
(string) --
(string) --
Error (dict) --
Error messages for environment variables that could not be applied.
ErrorCode (string) --
The error code.
Message (string) --
The error message.
KMSKeyArn (string) --
The KMS key used to encrypt the function's environment variables. Only returned if you've configured a customer managed CMK.
TracingConfig (dict) --
The function's AWS X-Ray tracing configuration.
Mode (string) --
The tracing mode.
MasterArn (string) --
The ARN of the master function.
RevisionId (string) --
Represents the latest updated revision of the function or alias.
Layers (list) --
A list of function layers .
(dict) --
A function layer.
Arn (string) --
The Amazon Resource Name (ARN) of the function layer.
CodeSize (integer) --
The size of the layer archive in bytes.
{'Layers': ['string'], 'Runtime': ['provided', 'ruby2.5']}Response
{'Layers': [{'Arn': 'string', 'CodeSize': 'long'}], 'Runtime': ['provided', 'ruby2.5']}
Updates the configuration parameters for the specified Lambda function by using the values provided in the request. You provide only the parameters you want to change. This operation must only be used on an existing Lambda function and cannot be used to update the function's code.
If you are using the versioning feature, note this API will always update the $LATEST version of your Lambda function. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases .
This operation requires permission for the lambda:UpdateFunctionConfiguration action.
See also: AWS API Documentation
Request Syntax
client.update_function_configuration( FunctionName='string', Role='string', Handler='string', Description='string', Timeout=123, MemorySize=123, VpcConfig={ 'SubnetIds': [ 'string', ], 'SecurityGroupIds': [ 'string', ] }, Environment={ 'Variables': { 'string': 'string' } }, Runtime='nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', DeadLetterConfig={ 'TargetArn': 'string' }, KMSKeyArn='string', TracingConfig={ 'Mode': 'Active'|'PassThrough' }, RevisionId='string', Layers=[ 'string', ] )
string
[REQUIRED]
The name of the Lambda function.
Name formats
Function name - MyFunction .
Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
Partial ARN - 123456789012:function:MyFunction .
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
string
The Amazon Resource Name (ARN) of the IAM role that Lambda will assume when it executes your function.
string
The function that Lambda calls to begin executing your function. For Node.js, it is the module-name.export value in your function.
string
A short user-defined function description. AWS Lambda does not use this value. Assign a meaningful description as you see fit.
integer
The amount of time that Lambda allows a function to run before terminating it. The default is 3 seconds. The maximum allowed value is 900 seconds.
integer
The amount of memory, in MB, your Lambda function is given. AWS Lambda uses this memory size to infer the amount of CPU allocated to your function. Your function use-case determines your CPU and memory requirements. For example, a database operation might need less memory compared to an image processing function. The default value is 128 MB. The value must be a multiple of 64 MB.
dict
Specify security groups and subnets in a VPC to which your Lambda function needs access.
SubnetIds (list) --
A list of VPC subnet IDs.
(string) --
SecurityGroupIds (list) --
A list of VPC security groups IDs.
(string) --
dict
The parent object that contains your environment's configuration settings.
Variables (dict) --
Environment variable key-value pairs.
(string) --
(string) --
string
The runtime version for the function.
dict
A dead letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead Letter Queues .
TargetArn (string) --
The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
string
The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's environment variables. If you elect to use the AWS Lambda default service key, pass in an empty string ("") for this parameter.
dict
Set Mode to Active to sample and trace a subset of incoming requests with AWS X-Ray.
Mode (string) --
The tracing mode.
string
An optional value you can use to ensure you are updating the latest update of the function version or alias. If the RevisionID you pass doesn't match the latest RevisionId of the function or alias, it will fail with an error message, advising you to retrieve the latest function version or alias RevisionID using either GetFunction or GetAlias .
list
A list of function layers to add to the function's execution environment.
(string) --
dict
Response Syntax
{ 'FunctionName': 'string', 'FunctionArn': 'string', 'Runtime': 'nodejs'|'nodejs4.3'|'nodejs6.10'|'nodejs8.10'|'java8'|'python2.7'|'python3.6'|'python3.7'|'dotnetcore1.0'|'dotnetcore2.0'|'dotnetcore2.1'|'nodejs4.3-edge'|'go1.x'|'ruby2.5'|'provided', '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', 'RevisionId': 'string', 'Layers': [ { 'Arn': 'string', 'CodeSize': 123 }, ] }
Response Structure
(dict) --
A Lambda function's configuration settings.
FunctionName (string) --
The name of the function.
FunctionArn (string) --
The function's Amazon Resource Name.
Runtime (string) --
The runtime environment for the Lambda function.
Role (string) --
The function's execution role.
Handler (string) --
The function Lambda calls to begin executing your function.
CodeSize (integer) --
The size of the function's deployment package in bytes.
Description (string) --
The function's description.
Timeout (integer) --
The amount of time that Lambda allows a function to run before terminating it.
MemorySize (integer) --
The memory allocated to the function
LastModified (string) --
The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
CodeSha256 (string) --
The SHA256 hash of the function's deployment package.
Version (string) --
The version of the Lambda function.
VpcConfig (dict) --
The function's networking configuration.
SubnetIds (list) --
A list of VPC subnet IDs.
(string) --
SecurityGroupIds (list) --
A list of VPC security groups IDs.
(string) --
VpcId (string) --
The ID of the VPC.
DeadLetterConfig (dict) --
The function's dead letter queue.
TargetArn (string) --
The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
Environment (dict) --
The function's environment variables.
Variables (dict) --
Environment variable key-value pairs.
(string) --
(string) --
Error (dict) --
Error messages for environment variables that could not be applied.
ErrorCode (string) --
The error code.
Message (string) --
The error message.
KMSKeyArn (string) --
The KMS key used to encrypt the function's environment variables. Only returned if you've configured a customer managed CMK.
TracingConfig (dict) --
The function's AWS X-Ray tracing configuration.
Mode (string) --
The tracing mode.
MasterArn (string) --
The ARN of the master function.
RevisionId (string) --
Represents the latest updated revision of the function or alias.
Layers (list) --
A list of function layers .
(dict) --
A function layer.
Arn (string) --
The Amazon Resource Name (ARN) of the function layer.
CodeSize (integer) --
The size of the layer archive in bytes.