IAM Flashcards

1
Q

What is Access Keys?

A

A pair of key consisting of the Access Key ID and the Secret Access Key.

While the ID is open (like a username) and shared, the Secret can only be downloaded once.

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

Do the Access Keys expire?

A

No - but it is best practice to rotate keys

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

How many Access Keys can a user have?

A

Two (doesn’t matter if active or inactive) - But you can always delete the keys

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

What is best practice to remove a key?

A

First set the key inactive - check for any problems.

Then delete the key and create a new one

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

What are the two “types” of policies and what are they attached/used for?

A

Identity policy: Given to a user or a group

Resource policy: Attached to a resource such as EC2

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

Describe the Attributes of a policy statement

A

Sid: Statement ID - What is the purpose?

Effect: What does the policy do? Allow / Deny

Action: Scope for the effect in terms of rights

Resource: What part of AWS is affected? (Service, S3 Bucket, DynamoDB table etc.)

Condition: Under what conditions does the policy take effect

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

What would dynamodb:Delete* do?

A

Access or denial of everything under :Delete

:DeleteBackup, :DeleteItem, :DeleteTable

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

What would dynamodb:*Table do?

A

Access or denial of everything ending with Table, dynamodb:CreateGlobalTable e.g.

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

What is the difference between and Permission and a Trust Policy?

A

Permission: Like a normal policy for a user, gives perssions to the role

Trust: Defines who can assume the role (EC2 e.g.)

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

Is it possible to give a role to resources in another account?

A

Yes, using the account in the trust policy

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

Can you restrict permissions to the Master Account in an AWS Organization?

A

No.

Only for Member Accounts or Organizational Units

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

What are the ways to add an account into an AWS Organization?

A

Invite an existing account

Create a new account

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

Which service control policy allows access to all AWS services within an attached member account?

A

FullAWSAccess

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

Is the master account affected by a SCP set on the root?

A

No, the master account is not affected by a Service Control Policy.

AWS Organizations use Inverse Tree Architecture, which starts at the root and flows onto any member or organization unit below.

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

How can you restrict a root user of an Organization Unit(!!) account?

A

By creating and attaching a service control policy

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

How to distinguish policy item on bucket/object level?

A

With the *

bucket: s3::bucketname
object: s3::bucketname/*

17
Q

What does ec2:describe as an action do?

A

Gives read only access to the ec2 instances

18
Q

What are the four types of roles?

A
  1. Service Roles (Allowing a service - EC2 e.g. - to access other services)
  2. AWS Service-Linked roles (very speciific rules for example for the Amazon Lex Bot)
  3. Cross Access Roles (Access for the trusted account to access the trusting account)
  4. Identity Provider (Access for Web/SAML Identitiy Providers to access the services)
19
Q

What are the two types of policies?

A
Managed Policies (AWS managed & Customer managed)
Inline Policies (directly attached to a group or user)
20
Q

Can you change the role of a running EC2 instance?

A

No, there should be an AMI created and on launch the new role should be created

21
Q

Organisations:

What are the four main functions of AWS Organisations?

A
  • Centrally Manage Policies accross multiple accounts
  • Controll access to the services
  • Automate Account Creations
  • Consolidate Billing across accounts
22
Q

What are SCPs?

A

Service Control Policies
Created and managed in AWS Organisations, limit access across accounts.
Have precedence over IAM policies

23
Q

What is an Identity-based policy?

A

Identity-based policies are JSON permissions policy documents that control what actions an identity (users, groups of users, and roles) can perform, on which resources, and under what conditions.

There are AWS managed and Customer managed policies

It’s also possible to attach the policy directly as an inline policy

24
Q

What is a Resource-based policy?

A

Directly attached to the service (S3 Bucket, Dynamo DB table e.g.) direclty
With resource-based policies, you can specify who has access to the resource and what actions they can perform on it.

25
Q

What is a Permissions boundary? (Policy)

A

A permissions boundary is an advanced feature in which you set the maximum permissions that an identity-based policy can grant to an IAM entity.

26
Q

What is an Access control lists (ACLs)?

A

Access control lists (ACLs) are service policies that allow you to control which principals in another account can access a resource. ACLs cannot be used to control access for a principal within the same account

ACLs are similar to resource-based policies, although they are the only policy type that does not use the JSON policy document format.

27
Q

What are IAM Condition keys?

A

Special permission control that can be used in Lambda.
Can be used for three different conditions:
- lambda:VpcIds - Allow/Deny a VPC
- lambda:SubnetIds - Allow/Deny a subnet
- lambda:SecurityGroupIds - Allow/Deny a Security Group

28
Q

IAM: Define the IAM User

A

Individual, system or application that interacts with the AWS ecosystem programmatically, through the console or CLI

29
Q

IAM: Define the root user

A

Only user with an email address als the username.

Cannot be restricted, therefore should not be used in production.

30
Q

IAM: What is a group?

A

Collections of users.
Cannot be nested (groups in groups)
Users can be in multiple groups

31
Q

IAM: When should a role be used?

A

When temporary access should be granted or the accessor should not be handed the credentials:

  • EC2 instances, connecting to other services
  • IAM users that have temporary elevated rights
  • Federated / cross-account access