AWS CLI, SDK, IAM, Roles & Policies Flashcards
What does AWS EC2 Instance Metadata (IMDS) allow?
It allows AWS EC2 instances to ”learn about themselves” without using an IAM Role for that purpose.
You can retrieve the ………from the……., but you CANNOT retrieve the………..
IAM Role name, metadata, IAM Policy
How can you perform actions on AWS directly from your applications code ? (without using the CLI).
Use an SDK (software development kit)
We have to use the……… when coding against……….
AWS SDK, AWS Services
if you don’t specify or configure a default region,……
then us-east-1 will be chosen by default
What should you do if you get ThrottlingException intermittently?
Use exponential backoff
Must only implement the retries on……. and…..
Do not implement on the……
5xx server errors, throttling, 4xx client errors
What is Exponential Backoff?
A strategy used in computing to manage retries of failed requests.
How does Exponential Backoff work:
- Start with a wait time for the first retry, for example, one second.
- If the first retry fails, double the wait time for the next attempt, resulting in a two-second delay
. - Continue doubling the wait time for each subsequent retry (four seconds, eight seconds, sixteen seconds, etc.).
Order of the AWS CLI Credentials Provider Chain?
- Command line options
- Environment variables
- CLI credentials file
- CLI configuration file
- Container credentials
- Instance profile credentials
Order of AWS SDK Default Credentials Provider Chain?
- Java system properties
- Environment variables
- The default credential profiles file
- Amazon ECS container credentials
- Instance profile credentials
NEVER EVER STORE AWS CREDENTIALS IN YOUR CODE
Best practice is for……… to be……… from the…………
credentials, inherited, credentials chain
If working within AWS how should you grant permissions?
IAM Roles
EC2 Instances Roles grant permission for?
EC2 Instance
ECS roles grant permission for?
ECS taskes