Q: 8
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 CtoudFront 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?
Options
Discussion
B vs D? I think it's B because Lambda@Edge functions have to be in us-east-1, and SAM tries to create everything in the region you pick. But D threw me off for a sec since S3 and CloudFront are global-ish. Not totally sure though, AWS quirks get me sometimes.
Probably A, seen similar on practice tests. Official AWS docs and whitepapers on Lambda async invocation would help for stuff like this.
I don’t think it’s A. B for sure, Lambda@Edge functions must be created in us-east-1 or stack fails deploying elsewhere.
If anything, B: Had something like this in a mock exam, and Lambda@Edge always needed the function to be created in us-east-1 or you'd get deployment errors. Creating it in eu-west-1 fails for that reason. Pretty sure that's still current, correct me if AWS changed recently.
Its B
Was anyone else confused by A at first? CloudFront itself can be created in any region, but Lambda@Edge always has to go via us-east-1. Just making sure I’m not missing some recent update here.
I'd check on option B here, since Lambda@Edge functions always have to be created in us-east-1. When you try deploying a SAM stack in another region like eu-west-1 with Lambda@Edge, it fails because of that requirement. All other resources (CloudFront, S3) can be defined anywhere but Lambda@Edge is the gotcha. Pretty sure that's still the current behavior, unless AWS recently changed it-anyone seen an update?
Its B, classic AWS gotcha with Lambda@Edge stuck to us-east-1. Running this in eu-west-1 always fails. Seen this trip people up.
Not convinced by C, that's a common trap with API Gateway timeouts. A
B for sure, Lambda@Edge needs to be deployed in us-east-1 or CloudFormation will fail the stack. S3 and CloudFront can be in any region but the edge function is the blocker here. Pretty sure that's the gotcha, but correct me if AWS changed this.
Be respectful. No spam.
Question 8 of 35