AWS EC2 - part 2 Flashcards

1
Q

What is EC2 user data

A

possible to bootstrap instances using an EC2 user data script

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

what is bootstrapping?

A

launching commands when a machine starts

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

How often is EC2 user data script run?

A

Only once, when machine starts

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

What are some examples of how UC2 user data is used to automate boot tasks?

A

Installing Updates
Installing Software
Downloading common files from the internet
Anything you can think of

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

What user does EC2 user data script run under?

A

root/admin

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

What can you configure for an EC2 instance?

A

CPU
Memory
Storage
Network performance
EBS bandwidth

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

What does the EC2 instance naming convention?

A

m:instance class, 5:generation, 2xlarge: size of instance class

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

What is a Security Group?

A

A firewall on our EC2 instance.
Regulate access to ports
authorized IP ranges
control inbond netowrk
control outbound network
type: protocol, port range, source

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

How many instances can a security group to be associated?

A

many

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

If app gets a timeout (not accessible) what is the likely cause of the errror?

A

Security group issue

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

If your app give “connection refused” error, what is the likely cause?

A

An application error or it is not launched

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

What is port 22 for?

A

SSH

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

What is port 21 for?

A

FTP

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

What is port 22 for?

A

Secure File Transfer Protocol (upload files using SSH)

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

what is port 80 and 443 for?

A

http/https

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

What is port 3389 for?

A

RDP for windows instances

17
Q

What do you use for SSH for?

A

To remote into servers (mac, linux, windows >= 10)

18
Q

What is EC2 instance connect?

A

Remote into to any OS

19
Q

What is the command line to SSH to an instance?

A

ssh usersname@IPaddress, example ssh ec2-users@3.250.26.200

20
Q

How to use EC2 .pem file?

A

ssh -i <*.pem> ec2-users@<publicip> in directory with pem file (after chmod 0400 pem file)</publicip>

21
Q

How to you provide aws permissions to an EC2 instance?

A

Attach an IAM role (in the EC2 instance UI for example)

22
Q

How are you charged for an on-demand instance?

A

By the second

23
Q

How are you charged for reserved instances?

A

Up to 72% discount, pay by the year or 3 years, pay no upfront, partial upfront, all upfront

24
Q

What is EC2 spot instance

A

can get 90% discount, instance you can lose at any time if your max price is less than spot price

25
Q

What is EC2 dedicated host?

A

A physical server dedicated, address compliance or use existing licenses

26
Q

What is ElasticIP

A

Public IP that doesn’t change when EC2 stops and starts. (Can only have 5 per AWS account) Should not use, use DNS instead

26
Q

What is ElasticIP

A

Public IP that doesn’t change when EC2 stops and starts. (Can only have 5 per AWS account) Should not use, use DNS instead

27
Q

What is a placement group?

A

can control EC2 placement strategy, (cluster(availability zone), spread, partition

28
Q

What is cluster placement group?

A

Same hardward/rack and availabiliy zone? pro, great network, con: single point of failure. use case(big data job, or needs high network throughput)

29
Q

What is spread placement group?

A

EC2 instances spread across machine and availability zones. Pro: availability. Con: limit to 7 instances. Use case: max high availability

30
Q

What is partition placement group?

A

Instances spread across multiple availability zones. Each partition represents a rack. Safe from rack failure. Up to 100s of instances. Use case: Big data, Kafka, Cassandra…