aws::lambda-function¶
Creates a lambda function.
Example¶
aws::lambda-function lambda-function-example
name: "testFunction"
handler: "index.handler"
runtime: "nodejs20.x"
role: "arn:aws:iam::242040583208:role/service-role/testFunctionRole"
content-zip-path: "example-function.zip"
tags: {
Name: "lambda-function-example"
}
lambda-layers: [
$(aws::lambda-layer lambda-layer-for-function-example-1)
]
end
Attributes¶
Attribute | Description |
---|---|
name | The name of the Lambda Function. (Required) |
description | The description of the Lambda Function. |
s3-bucket | The S3 bucket name where the Lambda Function code resides. Required if field ‘content-zip-path’ not set. |
s3-key | The S3 object key where the Lambda Function code resides. Required if field ‘content-zip-path’ not set. |
s3-object-version | The S3 object version where the Lambda Function code resides. Required if field ‘content-zip-path’ not set. |
content-zip-path | The zip file location where the Lambda Function code resides. Required if fields ‘s3-bucket’, ‘s3-key’ and ‘s3-object-version’ not set. |
role | The IAM Role to be associated with this Lambda Function. (Required) |
runtime | The runtime language for this Lambda Function. See Supported Runtimes for Lambda. (Required) |
handler | The name of the method within your code that Lambda calls to execute the Lambda Function. (Required) |
timeout | The amount of time that Lambda allows a Lambda Function to run before stopping it. Defaults to 3 . Valid values are between 3 to 900 . |
memory-size | The amount of memory that the Lambda Function has access to. Defaults to 128 . |
tracking-config | The tracking mode of the Lambda Function. Defaults to PassThrough . Valid values are PassThrough or Active Valid values are PassThrough or Active . |
dead-letter-config-arn | The arn of SQS queue or an SNS topic to be associated with the Lambda Function. |
kms-key | The KMS key to be associated with the Lambda Function. |
environment map | A map of key value pair acting as variables accessible from the code of with the Lambda Function. |
tags map | The set of tags to be associated with the Lambda Function. |
security-groups set | The set of security group be associated with the Lambda Function. |
subnets set | The set of subnet be associated with the Lambda Function. |
lambda-layers set | The set of version arns of Lambda Layers to be associated with the Lambda Function. |
reserved-concurrent-executions | The number of simultaneous executions to reserve for the Lambda Function. |
version-map map | A Map of versions and corresponding arns. |
publish | A flag that states to publish the code or not. |
permission set subresource | The set of permissions to be associated with the Lambda Function.
|
Outputs¶
Attribute | Description |
---|---|
arn | The arn for the lambda Lambda Function resource including the version. |
arn-no-version | The arn for the lambda Lambda Function resource without the version. |
revision-id | The revision ID for the Lambda Function. |
master-arn | The arn for the master function of the Lambda Function. |
last-modified | The date and time that the Lambda Function was last updated. |
version | The version of the Lambda Function. |