exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 401 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 401
Topic #: 1
[All AWS Certified Developer Associate Questions]

A developer is implementing a serverless application by using AWS CloudFormation to provision Amazon S3 web hosting, Amazon API Gateway, and AWS Lambda functions. The Lambda function source code is zipped and uploaded to an S3 bucket. The S3 object key of the zipped source code is specified in the Lambda resource in the CloudFormation template.

The developer notices that there are no changes in the Lambda function every time the CloudFormation stack is updated.

How can the developer resolve this issue?

  • A. Create a new Lambda function alias before updating the CloudFormation stack.
  • B. Change the S3 object key or the S3 version in the CloudFormation template before updating the CloudFormation stack.
  • C. Upload the zipped source code to another $3 bucket before updating the CloudFormation stack.
  • D. Associate a code signing configuration with the Lambda function before updating the CloudFormation stack.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
joshnort
1 year, 6 months ago
Selected Answer: B
"Changes to a deployment package [for an AWS Lambda function] in Amazon S3 or a container image in ECR 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
upvoted 1 times
...
JagpreetLM10
2 years, 5 months ago
Selected Answer: B
Change the S3 object key or the S3 version in the CloudFormation template before updating the CloudFormation stack. C. Upload the zipped source code to another $3 bucket before updating the CloudFormation stack. By changing the S3 object key or the S3 version in the CloudFormation template, CloudFormation will detect the changes and update the Lambda function accordingly. Additionally, uploading the zipped source code to another S3 bucket before updating the CloudFormation stack will also result in the Lambda function being updated.
upvoted 3 times
...
Phinx
2 years, 5 months ago
Selected Answer: B
Sorry it's B https://github.com/awsdocs/aws-cloudformation-user-guide/issues/1119
upvoted 2 times
...
breathingcloud
2 years, 5 months ago
Selected Answer: B
Make changes on the object keys so that CF will stat reflecting the changes
upvoted 4 times
...
Phinx
2 years, 5 months ago
Selected Answer: A
A is the most sensible answer https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...