EC2 instance roles Flashcards

1
Q

What is the main purpose of using IAM roles?

A

In general, IAM roles are the best practice ways for services to be granted permissions.

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

What do EC2 Instance roles do?

A

EC2 instance roles are roles that an instance can assume and anything
running in that instance has the permissions that role grants.

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

How do EC2 instance roles work?

A

An IAM role must be defined with a permissions policy.

Then the EC2 instance role allows the EC2 service to assume that role.

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

What is the instance profile and what does it do?

A

The instance profile is the item that allows the permissions to get inside the instance. When you create an instance role in the console, an instance profile is created with the same name.

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

Once an IAM role is assumed, how are credentials passed through to the instance?

A

Via the meta-data.

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

Do the credentials provided to the instance as result of assuming a role expire?

A

EC2 and the secure token service ensure the credentials never expire.

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

Mention some key facts about credentials inside meta-data:

A

Credentials can be found in iam/security-credentials/role-name
Credentials are automatically rotated - always valid - as long as that role is attached to the

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

Why are roles important?

A

Because you should always use roles compared to storing long term credentials (for example, access keys…).

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

Do CLI tools use role credentials automatically?

A

Yes.

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