0
0
AWScloud~20 mins

Lambda with API Gateway pattern in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Lambda API Gateway Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Identify the correct architecture for Lambda with API Gateway

Which architecture diagram correctly represents the flow when using AWS Lambda with API Gateway to handle HTTP requests?

AClient sends HTTP request → API Gateway receives request → API Gateway stores request in S3 → Lambda polls S3 for requests → Lambda processes and writes response to DynamoDB → Client reads response from DynamoDB
BClient sends HTTP request → Lambda function receives request directly → Lambda processes and sends response to API Gateway → API Gateway forwards response to client
CClient sends HTTP request → API Gateway receives request → API Gateway triggers Lambda function → Lambda processes and returns response → API Gateway sends response back to client
DClient sends HTTP request → API Gateway receives request → API Gateway triggers EC2 instance → EC2 instance processes request and sends response back to API Gateway → API Gateway sends response to client
Attempts:
2 left
💡 Hint

Think about which component directly triggers the Lambda function in a typical serverless HTTP request flow.

scaling
intermediate
2:00remaining
Scaling considerations for Lambda with API Gateway

When your API Gateway triggers Lambda functions under heavy load, which of the following is a correct statement about scaling?

AAPI Gateway scales automatically, but Lambda functions require manual scaling configuration
BBoth API Gateway and Lambda require manual scaling to handle increased traffic
CNeither API Gateway nor Lambda can scale beyond 100 concurrent requests
DLambda functions scale automatically with incoming requests, but API Gateway has a fixed limit and can throttle requests if exceeded
Attempts:
2 left
💡 Hint

Consider which AWS service is serverless and automatically scales, and which has limits that can cause throttling.

tradeoff
advanced
2:00remaining
Tradeoff between synchronous and asynchronous invocation in Lambda with API Gateway

What is a key tradeoff when choosing synchronous invocation of Lambda via API Gateway versus asynchronous invocation?

ASynchronous invocation does not support retries; asynchronous invocation supports automatic retries and error handling
BSynchronous invocation reduces latency and provides immediate response; asynchronous invocation increases latency and provides immediate response
CSynchronous invocation provides immediate response but can increase latency; asynchronous invocation reduces latency but does not provide immediate response
DSynchronous invocation is cheaper than asynchronous invocation in all cases
Attempts:
2 left
💡 Hint

Think about how retries and error handling differ between synchronous and asynchronous Lambda calls.

🧠 Conceptual
advanced
2:00remaining
Understanding cold start impact in Lambda with API Gateway

Which statement best describes the impact of cold starts on user experience when using Lambda with API Gateway?

ACold starts improve Lambda function performance by preloading dependencies before invocation
BCold starts cause a delay in Lambda function execution, increasing API response time, especially for infrequently used functions
CCold starts only occur when Lambda functions are invoked asynchronously, not via API Gateway
DCold starts have no impact on API Gateway latency because API Gateway caches all responses
Attempts:
2 left
💡 Hint

Consider what happens when a Lambda function is invoked after being idle for some time.

estimation
expert
2:00remaining
Estimating maximum requests per second for Lambda with API Gateway

Your API Gateway is configured with a default regional endpoint and triggers a Lambda function. The Lambda function has a concurrency limit of 1000. API Gateway has a soft limit of 10,000 requests per second (RPS). What is the maximum sustained RPS your system can handle without throttling?

ACannot determine without knowing Lambda function execution duration
B10,000 RPS, limited by API Gateway soft limit
C11,000 RPS, sum of Lambda concurrency and API Gateway limit
D1000 RPS, limited by Lambda concurrency
Attempts:
2 left
💡 Hint

Lambda concurrency limits concurrent executions, but sustained RPS = concurrency / average execution duration in seconds. Without duration, cannot determine the bottleneck.