This easy quiz covers key concepts about Amazon API Gateway and AWS Lambda to test your understanding of their integration, endpoints, and security mechanisms.
What is the main use of Amazon API Gateway in an application architecture?
Explanation: API Gateway is designed to handle creation, management, and monitoring of APIs. It is not used for building databases, automating machine learning pipelines, or designing mobile interfaces, which are handled by different AWS services.
How does AWS Lambda typically work with API Gateway?
Explanation: API Gateway forwards HTTP requests to Lambda functions, which then process them and return responses. API Gateway does not deploy Lambda code, store logs exclusively, or delegate access policy management to Lambda.
Which endpoint type in API Gateway is best for internal applications within a VPC?
Explanation: Private endpoints expose APIs only within a VPC, making them suitable for internal use. Edge-optimized and Regional are accessible from the internet, and 'Public' is not an official API Gateway endpoint type.
Which of the following is NOT a way API Gateway can secure APIs?
Explanation: Mobile push notifications are unrelated to API security. IAM Permissions, Cognito User Pools, and Lambda Authorizers are all supported methods for securing API Gateway endpoints.
What is a key benefit of an edge-optimized API Gateway endpoint?
Explanation: Edge-optimized endpoints use CloudFront to reduce latency worldwide. They are not for offline use, private cloud exclusivity, or database scaling.
Which AWS service can API Gateway use to monitor and log API usage?
Explanation: CloudWatch is used for API logging and monitoring. S3 is a storage service, DynamoDB is for databases, and SNS is for messaging.
What does API Gateway do when a user makes an HTTP request to an endpoint integrated with Lambda?
Explanation: API Gateway acts as a front door by forwarding incoming HTTP requests to Lambda. It does not store requests in S3, redirect users to CloudFront only, or block requests unless configured to do so.
Why would you use throttling and rate-limiting features in API Gateway?
Explanation: Throttling and rate-limiting help control API traffic and prevent overload or abuse. They do not back up data, speed up Lambda, or assist with UI design.
When would you use Cognito User Pools with API Gateway?
Explanation: Cognito User Pools are designed for user authentication with APIs. They do not optimize databases, handle emails, or manage Lambda memory.
When is the Regional endpoint type in API Gateway most beneficial?
Explanation: Regional endpoints reduce cost and latency for clients in the same region. Global access is better handled by edge-optimized endpoints, and the other options do not describe endpoint type benefits.