AWS CLI, SDK, IAM, Roles & Policies Flashcards

1
Q

What does AWS EC2 Instance Metadata (IMDS) allow?

A

It allows AWS EC2 instances to ”learn about themselves” without using an IAM Role for that purpose.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

You can retrieve the ………from the……., but you CANNOT retrieve the………..

A

IAM Role name, metadata, IAM Policy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How can you perform actions on AWS directly from your applications code ? (without using the CLI).

A

Use an SDK (software development kit)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

We have to use the……… when coding against……….

A

AWS SDK, AWS Services

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

if you don’t specify or configure a default region,……

A

then us-east-1 will be chosen by default

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What should you do if you get ThrottlingException intermittently?

A

Use exponential backoff

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Must only implement the retries on……. and…..
Do not implement on the……

A

5xx server errors, throttling, 4xx client errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Exponential Backoff?

A

A strategy used in computing to manage retries of failed requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does Exponential Backoff work:

A
  1. Start with a wait time for the first retry, for example, one second.
  2. If the first retry fails, double the wait time for the next attempt, resulting in a two-second delay
    .
  3. Continue doubling the wait time for each subsequent retry (four seconds, eight seconds, sixteen seconds, etc.).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Order of the AWS CLI Credentials Provider Chain?

A
  1. Command line options
  2. Environment variables
  3. CLI credentials file
  4. CLI configuration file
  5. Container credentials
  6. Instance profile credentials
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Order of AWS SDK Default Credentials Provider Chain?

A
  1. Java system properties
  2. Environment variables
  3. The default credential profiles file
  4. Amazon ECS container credentials
  5. Instance profile credentials
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

NEVER EVER STORE AWS CREDENTIALS IN YOUR CODE

Best practice is for……… to be……… from the…………

A

credentials, inherited, credentials chain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

If working within AWS how should you grant permissions?

A

IAM Roles

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

EC2 Instances Roles grant permission for?

A

EC2 Instance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

ECS roles grant permission for?

A

ECS taskes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Lambda Roles grant permissions for?

A

Lambda functions

17
Q

how do you grant permissions working outside of AWS?

A

Environment variables / named profiles

18
Q

When are requests signed for you?

A

If you use the SDK or CLI, or HTTP

19
Q

Do all requests to Amazon S3 need to signed?

A

No, some don’t need to be signed.

20
Q

When you have an IAM role attached to your EC2 instance and you run AWS CLI commands from inside this instance, AWS CLI uses the …………. to get ……… credentials.

A

Instance Metatdata, temporary

21
Q

What must be created to use MFA with the CLI

A

Create a temporary session

22
Q

How can you get temporary session credentials?

A

Must run STS GetSession Token API call