Deploying Serverless Applications with AWS CodeDeploy

Lambda Function Additional Properties

Prev Question Next Question

Question

You are planning to deploy the serverless application using AWS CodeDeploy.

This application will be using AWS Lambda compute platform & an AppSpec file will be created using YAML.

To specify a Lambda function's additional properties, which of the following properties needs to be specified in the resources section with an AppSpec file? (Select Three).

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Correct Answer - A, D, E.

AppSec Resources Section for a Lambda deployment consists of the following properties,

name.

alias.

current version.

target version.

Option B & C are incorrect as TaskDefinition & Port property needs to be specified for ECS Deployment & not for Lambda Deployment.

For more information on AppSpec resources for ECS/Lambda deployment with AWS CodeDeploy, refer to the following URL-

https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-resources.html

AWS CodeDeploy is a deployment service that automates software deployments to a variety of compute services including Amazon EC2, AWS Lambda, and on-premises servers. It simplifies the process of rolling out new features or updating an application in production, with minimal downtime.

When deploying a serverless application using AWS CodeDeploy with AWS Lambda compute platform, an AppSpec file is created using YAML. The AppSpec file is used to specify the deployment instructions, such as where to copy files, which functions to execute, and how to route traffic during deployment.

To specify a Lambda function's additional properties, we need to specify the following properties in the resources section with an AppSpec file:

  1. Name: The name of the Lambda function. This property is required and must match the name of the function in the AWS Lambda service.

  2. TaskDefinition: The task definition that contains the configuration information for the container that runs the Lambda function. This property is optional and is used when the Lambda function is deployed in a container.

  3. Targetversion: The version of the Lambda function to deploy. This property is required and must match the version number of the function in the AWS Lambda service.

Therefore, the correct options from the given choices are A. Name, B. TaskDefinition, and D. Targetversion.

C. Port and E. Currentversion are not required to be specified in the AppSpec file when deploying a serverless application using AWS CodeDeploy with AWS Lambda compute platform.