Menu
AWS CodeDeploy
User Guide (API Version 2014-10-06)

AppSpec 'resources' Section (AWS Lambda Deployments Only)

The 'resources' section specifies the Lambda function to deploy and has the following structure:

YAML:

Copy
resources: - name-of-function-to-deploy: type: "AWS::Lambda::Function" properties: name: name-of-lambda-function-to-deploy alias: alias-of-lambda-function-to-deploy currentversion: optional - the latest version is used if this is not specified targetversion: version-of-the-lambda-function-to-deploy

JSON:

Copy
"resources": [{ "name-of-function-to-deploy" { "type": "AWS::Lambda::Function" "properties": { "name": "name-of-function-to-deploy" "alias": "alias-of-lambda-function-to-deploy" "currentversion": "optional - the latest version is used if this is not specified "targetversion": "version-of-the-lambda-function-to-deploy" } } }]

The instructions are as follows:

  • name – Required. This the name of the Lambda function to deploy.

  • alias – Required. This is the name of the alias to the Lambda function.

  • currentversion – Required. This is the version of the Lambda function traffic currently points to.

  • targetversion – Required. This is the version of the Lambda function traffic is shifted to.