Which architecture diagram correctly represents the flow when using AWS Lambda with API Gateway to handle HTTP requests?
Think about which component directly triggers the Lambda function in a typical serverless HTTP request flow.
API Gateway acts as the front door for HTTP requests and triggers the Lambda function directly. The Lambda function processes the request and returns the response to API Gateway, which then sends it back to the client.
When your API Gateway triggers Lambda functions under heavy load, which of the following is a correct statement about scaling?
Consider which AWS service is serverless and automatically scales, and which has limits that can cause throttling.
Lambda functions automatically scale to handle incoming requests. API Gateway also scales but has soft limits on request rates and concurrency that can cause throttling if exceeded.
What is a key tradeoff when choosing synchronous invocation of Lambda via API Gateway versus asynchronous invocation?
Think about how retries and error handling differ between synchronous and asynchronous Lambda calls.
Synchronous invocation waits for the Lambda function to complete and returns the response immediately. It does not support automatic retries. Asynchronous invocation queues the event and supports automatic retries and dead-letter queues for error handling.
Which statement best describes the impact of cold starts on user experience when using Lambda with API Gateway?
Consider what happens when a Lambda function is invoked after being idle for some time.
Cold starts happen when Lambda needs to initialize a new container to run the function, causing a delay that increases response time. This is more noticeable for functions invoked infrequently.
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?
Lambda concurrency limits concurrent executions, but sustained RPS = concurrency / average execution duration in seconds. Without duration, cannot determine the bottleneck.
The maximum sustained RPS is the minimum of API Gateway's RPS limit (10,000) and (Lambda concurrency limit / average execution duration in seconds). Since the execution duration is unknown, the exact maximum cannot be determined.