API Gateway Flashcards
1
Q
API Gateway
A
- serverless publicly accessible to proxy requests to things ..lambda for example
- websocket protocol - real time streaming
- HTTP integration - expose internal http endpoints to utilize rate limiting, caching, api keys, etc.
2
Q
API gateway endpoint types
A
- edge optimized - default - for global clients
- regional - for clients in one region
- private - only within your own VPC using ENI (VPC endpoints)
3
Q
API gateway auth
A
- IAM roles (useful for internal apps)
- cognito (mobile)
- custom authorizer (lambda)
- HTTPS custom domain name through aws cert manager
- must setup CNAME alias in R53 to point to api gateway
- cross account access - use a resource policy and and sigv4
4
Q
API gateway deployment stages
A
- MUST do deployment stage for changes to be active
- common to point gateway stage to lambda alias which points to specific lambda version
- cache, waf, logs, tracing settings are at the DEPLOYMENT level
5
Q
API gateway integration types
A
- mock - return a response without sending the request to the backend
- http / aws lambda
- configure integration request/response
- setup data mapping using mapping templates for request & response
- json to xml
- aws_proxy (lambda proxy)
- no modification of request
- lambda is responsible for handling request as is
- http_proxy
- gateway to ALB
6
Q
api gateway throttling
A
- default - 10k rps across all API
- soft limit
- can set stage and method limits
- just like lambda concurrency, one API that is overloaded, if not limited causes other APIs to throttle
7
Q
API Gateway CORS
A
- cross origin resource sharing
- can enable in api gateway for only non-proxy endpoints
8
Q
rest vs http
A
REST APIs support more features than HTTP APIs, while HTTP APIs are designed with minimal features so that they can be offered at a lower price. Choose REST APIs if you need features such as API keys, per-client throttling, request validation, AWS WAF integration, or private API endpoints.
9
Q
Promoting test stage to prod stage
A
Update stage variable value from the stage name of test to that of prod (because stage name is included in url) or redeploying the API to the prod stage