Section 15: AWS Serverless: API Gateway & Cognito Flashcards
What does API Gateway do with proxy resource?
Passes the entire request and response between the frontend and the backend
What is the most popular integration with API Gateway?
AWS Lambda
What can API Gateway integrate with
Endpoints on EC2
Load Balancers
Any AWS service
External and publicly accessible HTTP endpoints
Are changes in an API Gateway API effective directly?
No, the API has to be published to a stage
What does API Gateway keeps in order to allow easy roll backs?
History of deployments
API Gateway offers configuration parameters at what level?
At the API stage level
Do APIs have environment variables?
Stages have stage variables (which is similar to environment variables but for a specific stage)
What can stage variables be used for?
Lambda function ARN
HTTP endpoints
Parameters in mapping templates
Are stage variables passed to AWS Lambda?
If the resource method integration type is a Lambda function, then yes stage variables are passed in the โcontextโ object
What are canary deployments?
Canary deployments are a pattern for rolling out releases to a subset of users or servers.
What are mapping templates in API Gateway?
They are a way to modify requests / responses (Rename parameters, modify body content, add headers, remove information, etc.)
In what language are mapping templates written?
Velocity Template Language (VTL)
What is a common way of writing REST API as code?
Swagger / Open API
What are the two supported languages when writing Swagger specification?
YAML
JSON
What can you do if one of your endpoints is receiving lots of traffic and the response is always the same?
Use caching
What is the default TTL in the API Gateway cache?
300 seconds (5 minutes)
What is the min TTL in the API Gateway cache?
0 seconds
What is the max TTL in the API Gateway cache?
3600 seconds (1 hour)
At which level are caches defined?
At the stage level
How much data can be in an API Gateway API stage cache at any given time? __ to __
0.5 GB to 237 GB
How can clients invalidate the cache manually?
By passing the header โCache-Control: max-age=0โ
At what level is it possible to enable CloudWatch logging?
At the stage level