AWS Certified Developer – Associate (DVA-C02) — Question 99

A developer is creating an AWS Serverless Application Model (AWS SAM) template. The AWS SAM template contains the definition of multiple AWS Lambda functions, an Amazon S3 bucket, and an Amazon CloudFront distribution. One of the Lambda functions runs on Lambda@Edge in the CloudFront distribution. The S3 bucket is configured as an origin for the CloudFront distribution.

When the developer deploys the AWS SAM template in the eu-west-1 Region, the creation of the stack fails.

Which of the following could be the reason for this issue?

Answer options

Correct answer: B

Explanation

The correct answer is B because Lambda@Edge functions must be created in the us-east-1 Region, regardless of where the CloudFront distribution is deployed. Option A is incorrect since CloudFront distributions can be created in other regions, while options C and D are false because an AWS SAM template can include multiple Lambda functions and both the CloudFront distribution and S3 bucket can be in the same Region.