Gateway and Cognito Flashcards
What is the default cache TTL in API Gateway?
300 seconds
What is the max TTL in API Gateway?
3600 seconds (1 hour)
What is the API Gateway cache capacity?
Between 0.5GB to 237GB
How can a client bypass the cache to get data from the backend?
Send the header “Cache-Control:max-age=0”
How do you get Cloudwatch Logs for API Gateway?
Enable Cloudwatch logs on the stage level
What are the 3 features of IAM in API GAteway?
- Great for users/roles already in your AWS account
- It handles authentication and authorization
- Leverages Sig v4
What are the 4 features of Custom Authorizor in API GAteway?
- Great for 3rd party tokens
- Very flexible in terms of what IAM policy is returned
- Handles authentication and authorization
- Py per Lambda invocation
What are the 3 features of Cognito User Pool in API GAteway?
- You manage your own user pool, FB, Google etc
- No need to write any custom code
- Must implement authorization in the backend
Why would you use Cognito?
If you want to give a user an identity so that they can interact with our app
What is Cognito User Pool?
Provides sign in functionality for app users
What is Cognito Identity Pool?
It is Federated Identity. It provides AWS credentials to users to access AWS resources directly
What is Cognito Sync?
It synchronizes data from a device to Cognito. Most likely being replaced by AppSync
What are the 3 ways to write code in the SAM template?
- AWS::SERVERLESS::FUNCTION
- AWS::SERVERLESS::API
- AWS::SERVERLESS::SIMPLETABLE