Serverless with Lambda and API Gateway
Master the Lambda execution model, concurrency and scaling, event sources, versions and aliases, and how API Gateway exposes functions with stages, authorisation and throttling.
Chapter quiz
Serverless with Lambda and API Gateway · 10 questions
1.A Lambda function creates a new DynamoDB client at the start of every invocation, adding latency. What is the best fix?
2.An SQS-triggered function processes batches of 10. Occasionally one bad message causes all 10 to be reprocessed. What should the developer enable?
3.A team wants to roll out a new Lambda version to 10% of users first and automatically roll back if errors increase. Which approach fits?
4.A REST API with Lambda proxy integration returns 502 Bad Gateway. The function runs successfully and returns the string "ok". What is the likely cause?
5.A critical Lambda function is throttled because another function in the account consumes most of the concurrency. Which change protects it?
6.A Lambda function in a VPC private subnet must call the public Stripe API and also read DynamoDB. Which setup works with the least exposure?
7.An asynchronous Lambda invocation fails after its retries and the event must be kept for analysis along with error details. What is the best option?
8.A SQS-triggered function processes batches of 10 messages. One bad message causes the whole batch to be retried. How do you avoid reprocessing the good ones?
9.A team wants to shift 10 percent of API traffic to a new Lambda version, then the rest after verification, with automatic rollback on alarms. Which approach fits?
10.A REST API method needs to reject requests missing a required JSON field before Lambda runs. What should you configure?
0 of 10 answered

