IAM + EC2 Flashcards

1
Q

What are the types of elements in IAM?

A

Users
Groups
Roles
Policies

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

What are IAM Roles?

A

Roles are a group of one or more policies that define the permissions of the role.

Roles are used for give aws servicess access to other services. Roles are attached directly to an AWS Resource.

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

What is an IAM Policy and what does it consist of?

A

It’s a JSON document. With one ore more statements.

Version
ID
Statement

Statement structure:
sid: statement id
Effect: Allow/Deny.
Principal: Which account, user, or role the statement with the permissions will apply to.
Action: The list of actions that will be allowed or denied.
Resource: The service resource the policy will be applied to.
Condition: parameters to decide if the policy is applied or not.

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

What can you do in IAM?

A

Set a password policy and expiration policy
Create users, groups, roles, policies.
Set up MFA
Generate Access Keys

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

In which ways can you access aws?

A

Management Console: Through web interface
AWS CLI: Through command line
AWS SDKs: Through code

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

How do users and groups behave in IAM?

A

A group cant be a member of another group.
A user inherits policies and permissions from every group he is in.

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

What is least privilege principle?

A

You dont give a user or group more privileges than they need.

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

What monitoring can you do with IAM?

A

You can make reports of all iam users and status of their credentials.

You can monitor individual users to see when did they last access each service. This is useful to set correct permissions to users. And remove permissions they dont use.

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

What does EC2 Service consist of?

A

EC2 instances
EBS Volumes
Instance Store
ELB
ASG: auto scaling group

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

What is an EC2 instance key pair?

A

It’s a pair of private and public keys you can use to give access to one or more EC2 instances. You assign one to an instance on creation.

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

What is ephemereal in an EC2 instance?

A

It’s instance store storage, and IP addresses. These are lost on stoppage.

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

What are the different EC2 instance types optimized for?

A

Memory optimized, storage optimized , compute optimized, general purpose, All with different sizes.

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

How is the more balanced EC2 instance tpye called?

A

General Purpose

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

What is a special feature of security groups in AWS?

A

You can enable inbound or outbound rules in security groups that are targeted to or from specific security groups, which will be attached to resources like other EC2 instances, load balancers, etc.

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

What are reserved instances?

A

You pay for an instance for 1 or 3 years. It’s cheaper cause it’s long term. Up to 72% discount compared to on demand.

You can pay upfront which is cheaper.

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

What are on demand instances?

A

You pay per second. Highest cost.

17
Q

What is savings plan?

A

Similar to reserved instances but more flexible. You commit to certain amount of usage and save costs long term. 1 or 3 years.

18
Q

What are Spot instances

A

Save up to 90% compared to on demand.

You can lose these instances in any point in time.

These instances have a spot price. You need to set a max price and if the spot price goes higher than your max you will lose the instances.

19
Q

What are EC2 dedicated hosts?

A

You rent a physical server with certain EC2 capacity.

Good for when your licenses are bound to a physical server.

dedicated host can be on demand or reserved.

This is the most expensive option

20
Q

What are EC2 dedicated instances?

A

Instances that run on physical server dedicated to you.

21
Q

Whats the difference between dedicated hosts and dedicated instances?

A

Both run instances in servers dedicated to you.

In dedicated instances, the physical server may change.

In dedicated hosts you have control of the underlying hardware. In dedicated instances you dont.

In dedicated instances you pay for the instances but in hosts you pay for the whole host.

22
Q

What is EC2 capacity reservation?

A

Reserve an amount of instance capacity for a set period. (You can choose any period ,short or long) You are charged as on demand whether you use the reserved capacity or not.

23
Q

What are spot fleets?

A

Spot fleets are a group of spot instances which can optionally include on demand instances.

This option automatically launches spot instances when the spot prices match your max.

24
Q

What are elastic ips?

A

It’s a public IP that is persistent through reboots of instances. You can have up to 5 per AWS account.

Elastic IP is usually a poor design choice. It’s preferrable to use an ELB or just DNS names

25
Q

What are placement groups?

A

You can create these to control the placement of your EC2 instances within a region. You have 3 options: Cluster, Spread, or Partition.

26
Q

What are the different kind of placement groups? How does each type work?

A

Cluster: Places instances in a low latency group within a single AZ.
Spread: Places instances in different AZs, and on different hardware. Is limited to 7 instances per AZ within 1 placement group.
Partition: Similar to spread, but can contain up to 100s of instances. This placement group consists of up to 7 partitons per AZ. The instances in one partition are in different hardware than the instances in the other partitions.

27
Q

What is an ENI?

A

Elastic network interface.

A single ENI as a mac address, at least a primary private ipv4 address.

And can contain an elastic public ip and a public ip per private ip.

28
Q

What are the instance requirements to be able to hibernate?

A

Root volume must be EBS.
EBS must be encrypted
Ram must be less tan 150GB
EBS volume must have a minimum space for the ram to be written to it.

Note: In hibernation ram is written to the ebs volume.

29
Q

What is an instance profile?

A

An instance profile is a container for an EC2 specific IAM Role. It allows the EC2 instance to run with the permissions defined in the role.

An instance profile with the same name is automatically created when you create an IAM Role for EC2.

30
Q

How can you attach a policy to a IAM user?

A

You can attach a policy directly to a user, or you can attach it to a group, and users of that group will have the policy attached indirectly.

31
Q

How do you access the AWS CLI?

A

You need a user with active access keys.