API Gateway Flashcards
Why would you use lambda authoriser instead of IAM in the API gateway?
IAM works only with AWS apps internal to AWS. Lambda authoriser can use OAUTH and SAML auth schemes so can be used with apps outside of AWS.
What API gateway permission scheme uses SigV4 and why would you use it?
IAM permissions for Lambda uses a SigV4 header to pass IAM credentials to API Gateway. You would use it when working with AWS apps that can leverage IAM.
For Lambda Authoriser, how is the token passed to the API gateway? Can the result of the call be cached
In the request header, and the results can be cached.
When using Lambda Authoriser - and assuming a successful auth against IAM, what must Lambda return to the API gateway?
A policy for the user must be returned
Can API gateway be used as a cloudfront origin? Why, Why not?
No. API’s are highly dynamic and changeable and are not good candidates for caching in Cloudfront
What is exponential backoff and why is it used?
If an API call fails with to many calls, exponential backoff limits subsequent calls to the API and prevents the API becoming overloaded. Uses an exponential pattern 10ms,20,40,80,160 etc
You have a group of users with facebook accounts which you want to be able to seamlessly provide access to an s3 bucket without having them log into AWS. Would you use a Cognito user pool or a federated identity pool and why?
Federated Identity Pool. These allow direct access to AWS resources. The client logs into the federated identity provider and receives an JWT token. This is used to authenticate and get credentials from STS. Federated identities are backed by IAM policies which authorise access to AWS resources.
Does API gateway support GraphQL automatically?
No.
What is the default protocol for API GW endpoints?
HTTPS