SkillSprout
Chapter 2

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.

1Lambda Execution Model and Configuration
Intermediate
6 min
2Concurrency, Scaling and Event Sources
Advanced
6 min
3Layers, Versions, Aliases and Deployments
Intermediate
6 min
4Amazon API Gateway
Intermediate
6 min

Chapter quiz

Serverless with Lambda and API Gateway · 10 questions

  1. 1.A Lambda function creates a new DynamoDB client at the start of every invocation, adding latency. What is the best fix?

  2. 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. 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. 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. 5.A critical Lambda function is throttled because another function in the account consumes most of the concurrency. Which change protects it?

  6. 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. 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. 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. 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. 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