A developer authored an AWS Serverless Application Model (AWS SAM) template that defines several Lambda functions, an S3 bucket, and a CloudFront distribution. One Lambda function is intended to run at the CloudFront edge (Lambda@Edge), and the S3 bucket is an origin for the distribution. Deploying the SAM stack into eu-west-1 fails. What is a likely cause of the failure?
Choose an answer
Tap an option to check your answer.
Correct answer: Lambda@Edge functions must be created in the us-east-1 Region..
Why this is the answer
Lambda@Edge functions must be deployed to the us-east-1 Region, regardless of the region where your CloudFront distribution is configured or where your SAM stack is deployed. CloudFront then replicates these functions globally. Attempting to deploy a Lambda@Edge function in any other region, such as eu-west-1 in this scenario, will result in a deployment failure. CloudFront distributions, while globally distributed, are managed from us-east-1 but can be created and associated with resources in any region. An AWS SAM template can define multiple Lambda functions and other resources. An S3 bucket can serve as a CloudFront origin and reside in the same region as the distribution's management point or other resources.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed