AWS Serverless Architecture and AWS Lambda 2 — Questions and Answers
Question 1: Which AWS service is most commonly used to expose Lambda functions as RESTful HTTP endpoints?
- AWS AppSync
- Amazon API Gateway (Correct answer)
- Elastic Load Balancing
- Amazon Route 53
Correct answer: Amazon API Gateway
Amazon API Gateway is a fully managed service for creating, deploying, and managing REST, HTTP, and WebSocket APIs that can invoke Lambda functions.
Question 2: What is the primary purpose of AWS Step Functions in a serverless architecture?
- Managing serverless database connection pooling
- Orchestrating multiple Lambda functions and AWS services into visual workflows (Correct answer)
- Monitoring and alerting on Lambda performance metrics
- Compressing and optimizing Lambda deployment packages
Correct answer: Orchestrating multiple Lambda functions and AWS services into visual workflows
AWS Step Functions orchestrates multiple Lambda functions and AWS services into coordinated workflows using state machines.
Question 3: Which Amazon DynamoDB feature automatically deletes table items after a developer-defined expiration timestamp?
- DynamoDB Streams
- DynamoDB Global Tables
- DynamoDB Time to Live (TTL) (Correct answer)
- DynamoDB Auto Scaling
Correct answer: DynamoDB Time to Live (TTL)
DynamoDB TTL lets you set a per-item expiration attribute; DynamoDB automatically deletes expired items within 48 hours at no extra cost.
Question 4: In Amazon API Gateway, what does a 'stage' represent?
- An IAM permission boundary for API callers
- A named snapshot of a deployment used to separate environments such as dev, test, and prod (Correct answer)
- A VPC endpoint configuration for private API access
- A response caching policy applied to all API methods
Correct answer: A named snapshot of a deployment used to separate environments such as dev, test, and prod
An API Gateway stage is a named reference to a deployment, enabling separate configurations and URLs for different environments like development and production.
Question 5: Which AWS service provides a fully managed serverless GraphQL API?
- Amazon API Gateway
- AWS AppSync (Correct answer)
- Amazon CloudFront
- AWS Lambda
Correct answer: AWS AppSync
AWS AppSync is a fully managed GraphQL service that connects to data sources like DynamoDB and Lambda and supports real-time subscriptions.
Question 6: What is the purpose of Lambda Destinations for asynchronous invocations?
- To configure VPC subnets where Lambda functions execute
- To automatically route the result of an async invocation to another AWS service on success or failure (Correct answer)
- To specify the S3 bucket used for uploading deployment packages
- To define the IAM execution role attached to a Lambda function
Correct answer: To automatically route the result of an async invocation to another AWS service on success or failure
Lambda Destinations send the result of an asynchronous function invocation to a target like SQS, SNS, EventBridge, or another Lambda based on success or failure outcome.
Question 7: Which AWS service acts as a central serverless event bus for routing events between AWS services, custom applications, and SaaS providers?
- Amazon SQS
- Amazon SNS
- Amazon EventBridge (Correct answer)
- AWS CloudTrail
Correct answer: Amazon EventBridge
Amazon EventBridge is a serverless event bus that routes events from AWS services, custom apps, and SaaS partners to targets like Lambda based on rules.
Which AWS service is most commonly used to expose Lambda functions as RESTful HTTP endpoints?