A developer is configuring a deployment for an AWS Lambda function using AWS CodeDeploy. The developer needs to define the deployment configuration and ensure CodeDeploy has the necessary permissions.
Which TWO of the following configurations or steps are required to successfully set up this deployment?
- Define the Resources section in the AppSpec file specifying the Lambda function name, alias, current version, and target version.Cevap
- Create an IAM service role for CodeDeploy with a trust policy that allows the codedeploy.amazonaws.com service to assume the role.Cevap
- CDefine the BeforeInstall and AfterInstall hooks in the AppSpec file to run deployment validation scripts.
- DConfigure the trust policy of the CodeDeploy IAM service role to allow the lambda.amazonaws.com service to assume it.
- EStore the application credentials in Systems Manager Parameter Store with automatic rotation enabled to secure the deployment.
Cevap
To successfully deploy a Lambda function using CodeDeploy, the developer must define the Resources section in the AppSpec file to specify function details, and create an IAM service role for CodeDeploy with a trust policy that permits the codedeploy.amazonaws.com service to assume it.
Defining the Resources section in the AppSpec file is required for Lambda deployments to specify the target function name, alias, and versions. Additionally, CodeDeploy requires an IAM service role with a trust policy allowing the codedeploy.amazonaws.com service to assume it to perform actions on the developer's behalf.
Adım Adım Çözüm
Anahtar Kavram
AWS CodeDeploy Lambda deployment configuration requires specifying function resources in the AppSpec file and establishing an IAM service role that trusts the CodeDeploy service.