FunctionCode - AWS Serverless Application Model
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

FunctionCode

The deployment package for a Lambda function.

Syntax

To declare this entity in your AWS Serverless Application Model (AWS SAM) template, use the following syntax.

YAML

Bucket: String Key: String Version: String

Properties

Bucket

An Amazon S3 bucket in the same AWS Region as your function.

Type: String

Required: Yes

CloudFormation compatibility: This property is passed directly to the S3Bucket property of the AWS::Lambda::Function Code data type.

Key

The Amazon S3 key of the deployment package.

Type: String

Required: Yes

CloudFormation compatibility: This property is passed directly to the S3Key property of the AWS::Lambda::Function Code data type.

Version

For versioned objects, the version of the deployment package object to use.

Type: String

Required: No

CloudFormation compatibility: This property is passed directly to the S3ObjectVersion property of the AWS::Lambda::Function Code data type.

Examples

FunctionCode

CodeUri: Function Code example

YAML

CodeUri: Bucket: sam-s3-demo-bucket-name Key: mykey-name Version: 121212