DVA-C02 · Question #39
A Developer has been asked to make changes to the source code of an AWS Lambda function. The function is managed using an AWS CloudFormation template. The template is configured to load the source cod
The correct answer is B. Update the CloudFormation stack with the correct values for the function code properties. Changes to a deployment package in Amazon S3 are not detected automatically during stack updates. To update the function code, change the object key or version in the template. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda- function-code.htm
Question
A Developer has been asked to make changes to the source code of an AWS Lambda function. The function is managed using an AWS CloudFormation template. The template is configured to load the source code from an Amazon S3 bucket. The Developer manually created a .ZIP file deployment package containing the changes and put the file into the correct location on Amazon S3. When the function is invoked, the code changes have not been applied. What step is required to update the function with the changes?
Options
- ADelete the .ZIP file on S3, and re-upload by using a different object key name.
- BUpdate the CloudFormation stack with the correct values for the function code properties
- CEnsure that the function source code is base64-encoded before uploading the deployment
- DModify the execution role of the Lambda function to allow S3 access permission to the
How the community answered
(33 responses)- A6% (2)
- B82% (27)
- C9% (3)
- D3% (1)
Explanation
Changes to a deployment package in Amazon S3 are not detected automatically during stack updates. To update the function code, change the object key or version in the template. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda- function-code.html
Community Discussion
No community discussion yet for this question.