AWS CLI, SDK, IAM Roles and Policies Flashcards
1
Q
aws profiles
A
- allow you to switch between different aws accounts on the cli
- aws configure —profile <prof></prof>
2
Q
AWS CLI MFA
A
- sts getSessionToken api call
- aws sts get-session-token mfa device token code duration …
- aws configure —profile mfa
- set session token
3
Q
aws sdk
A
- call aws resources from inside apps
- default region: us-east-1 for aws sdk
4
Q
aws limits (quotas)
A
- rate limits
- describInstances - 100 calls per second
- exponential backoff (AWS service)
- use it when you get throttlingException
- retry mechanism already included in aws sdk
- must implement yourself is using aws api
- must only implement retries on 5xx server errors
5
Q
AWS CLI Credentials provider chain
A
- command line options
- env variables
- cli credentials file
- cli configuration file
- container credentials for (ECS)
- instance profile credentials (EC2 instance profiles)
6
Q
AWS roles best practices
A
- in aws, use iam roles
- ec2 instance roles for ec2 instances
- ecs roles for ecs
- lambda roles
- outside aws
- env variables, named profiles, etc.