Fundamentals of AWS (Part 2) & RDS, Aurora, Elasticache Flashcards

1
Q

Define Scalability

A

Scalability means that an application / system can handle greater loads by adapting.

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

What are the two kinds of Scalabilty?

A
  • Vertical Scalability

* Horizontal Scalability (= elasticity)

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

Define Vertical Scalability?

A

Vertically scalability means increasing the size of the instance

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

What’s a case where scalability is very common?

A

databases

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

Name some services that can scale vertically

A

RDS, ElastiCache are services that can scale ver tically.

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

Define Horizontal Scaling

A

Horizontal Scalability means increasing the number of instances / systems for your application

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

What’s high availability and what purpose does it serve?

A

High availability means running your application / system in at least 2 data centers (== Availability Zones)
• The goal of high availability is to survive a data center loss

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

What can you use to horizontal scale: Increase number of instances?

A

Auto Scaling Group

• Load Balancer

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

What’s an application of High Availability?

A

Run instances for the same application across multi AZ

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

What are load balancers?

A

Load balancers are servers that forward internet traffic to multiple servers (EC2 Instances) downstream.

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

Why use a load balancer?

A
  • Spread load across multiple downstream instances
  • Expose a single point of access (DNS) to your application • Seamlessly handle failures of downstream instances
  • Do regular health checks to your instances
  • Provide SSL termination (HTTPS) for your websites
  • Enforce stickiness with cookies
  • High availability across zones
  • Separate public traffic from private traffic
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What’s an ELB?

A

EC2 Load Balancer - is a managed load balancer

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

What are the three types of Load Balancers?

A

Classic Load Balancer (v1 - old generation) - 2009
• Application Load Balancer (v2 - new generation) - 2016
• Network Load Balancer (v2 - new generation) - 2017
• Overall, it is recommended to use the newer / v2 generation load balancers as they provide more features

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

What are LB Health Checks?

A
  • Health Checks are crucial for Load Balancers
  • They enable the load balancer to know if instances it forwards traffic to are available to reply to requests
  • The health check is done on a port and a route (/health is common)
  • If the response is not 200 (OK), then the instance is unhealthy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What all do Application Load Balancers (ALB) allow you to do?

A

Application load balancers (Layer 7) allow to do:
• Load balancing to multiple HTTP applications across machines (target groups) • Load balancing to multiple applications on the same machine (ex: containers) • Load balancing based on route in URL
• Load balancing based on hostname in URL

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

What are ALB’s good for?

A

for micro services & container-based application (example: Docker & Amazon ECS)

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

Stickiness can be enabled at what level?

A

Stickiness can be enabled at the target group level
• Same request goes to the same instance
• Stickiness is directly generated by the ALB (not the application)

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

Network load balancers (Layer 4) allow to do:

A

Forward TCP traffic to your instances
• Handle millions of request per seconds
• Support for static IP or elastic IP
• Less latency ~100 ms (vs 400 ms for ALB)

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

ALB can route based on hostname / path?

A

True
• Support routing based on hostname (users.example.com & payments.example.com)
• Support routing based on path (example.com/users & example.com/payments)

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

ALB is a great fit with ___?

A

ECS (Docker)

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

Any Load Balancer (CLB, ALB, NLB) has a ____ host name?

A

Static

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

LB’s Scale instantaneously?

A

False

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

NLB directly see this___?

A

client IP

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

_xx errors are client induced errors? 4 or 5?

A

4

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

_xx errors are application induced errors. 4 or 5?

A

5 - Load Balancer Errors 503 means at capacity or no registered target

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

Check this if your LB can’t connect to your application.

A

Security Groups

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

Explain LB stickiness.

A

It is possible to implement stickiness so that the same client is always redirected to the same instance behind a load balancer

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

What kind of LB’s does stickiness work for?

A

This works for Classic Load Balancers & Application Load Balancers

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

The “cookie” used for stickiness doesn’t have an expiration date you control?

A

False - You control the expir date

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

How does ALB support dynamic host port mapping?

A

With ECS

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

For public facing NLB - must attach this to maintain static IP per AZ

A

Elastic IP

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

Private facing: will get random private IP based on free ones at time of creation? True of False

A

True

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

The Lb uses what kind of SSL/TLS certificate?

A

X.509

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

How do you manage AWS certificates?

A

ACM (AWS Certificate Manager)

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

What’s an Auto Scaling Group (ASG)?

A

The goal of an Auto Scaling Group (ASG) is to:
• Scale out (add EC2 instances) to match an increased load
• Scale in (remove EC2 instances) to match a decreased load
• Ensure we have a minimum and a maximum number of machines running • Automatically Register new instances to a load balancer

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

Use ____ as the scaling policy for ASG

A

CloudWatch Alarm

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

An ASG Launch Configurations includes?

A
  • AMI + InstanceType
  • EC2 User Data
  • EBSVolumes
  • Security Groups
  • SSH Key Pair
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

____ attached to an ASG will get assigned to EC2 instances??

A

IAM roles

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

What do you pay for when using an ASG?

A

ASG’s are free. You pay for the underlying resources being launched

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

Having instances under an ASG means that if they get terminated for whatever reason, the ASG will restart them. T/ F?

A

True

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

ASG’s will not terminate an instance marked as unhealthy by a LB?

A

False - It was terminate if marked unhealthy

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

Define ASG Default Termination Policy (simplified version)

A
  1. Find the AZ which has the most number of instances

2. If there are multiple instances in the AZ to choose from, delete the one with the oldest launch configuration

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

What’s the ASG The cooldown period?

A

Thecooldownperiod helps to ensure that yourAutoScaling group doesn’t launch or terminate additional instances before the previous scaling activity takes effect.

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

What’s an EBS Volume?

A

• An EC2 machine loses its root volume (main drive) when it is manually terminated.
• Unexpected terminations might happen from time to time (AWS would email you)
• Sometimes, you need a way to store your instance data somewhere
• An EBS (Elastic Block Store) Volume is a network drive you can attach
to your instances while they run
• It allows your instances to persist data

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

is EBS locked to AZ?

A
  • It’s locked to an Availability Zone (AZ)

* An EBS Volume in us-east-1a cannot be attached to us-east-1b • To move a volume across, you first need to snapshot it

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

EBS Volumes have provised capacity is what sizes?q

A

GB, and IOPS

47
Q

EBS VOlumes comes in 4 types?

A
  • GP2 (SSD): General purpose SSD volume that balances price and performance for a wide variety of workloads
  • IO1 (SSD): Highest-performance SSD volume for mission-critical low-latency or high- throughput workloads
  • ST1 (HDD): Low cost HDD volume designed for frequently accessed, throughput- intensive workloads
  • SC1 (HDD): Lowest cost HDD volume designed for less frequently accessed workloads
48
Q

Only these types of EBS volumes can be used as boot volumes

A

Only GP2 and IO1 can be used as boot volumes

49
Q

EBS Volumes are characterized in ..?

A

EBS Volumes are characterized in Size | Throughput | IOPS (I/O Ops Per Sec)

50
Q

EBS Volume Types Use cases GP2

A
  • Recommended for most workloads • System boot volumes
  • Virtual desktops
  • Low-latency interactive apps
  • Development and test environments
  • 1 GiB - 16TiB
  • Small gp2 volumes can burst IOPS to 3000
  • Max IOPS is 16,000…
  • 3 IOPS per GB, means at 5,334GB we are at the max IOPS
51
Q

EBS Volume Types Use cases IO1

A
  • Critical business applications that require sustained IOPS performance, or more than 16,000 IOPS per volume (gp2 limit)
  • Large database workloads, such as:
  • MongoDB, Cassandra, Microsoft SQL Server, MySQL, PostgreSQL, Oracle
  • 4 GiB - 16TiB
  • IOPS is provisioned (PIOPS) – MIN 100 - MAX 64,000 (Nitro instances) else
  • The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1
52
Q

EBS Volume Types Use cases ST1

A
  • Streaming workloads requiring consistent, fast throughput at a low price. • Big data, Data warehouses, Log processing
  • Apache Kafka
  • Cannot be a boot volume
  • 500 GiB - 16TiB
  • Max IOPS is 500
  • Max throughput of 500 MiB/s – can burst
53
Q

EBS Volume Types Use cases SC1

A
  • Throughput-oriented storage for large volumes of data that is infrequently accessed
  • Scenarios where the lowest storage cost is important
  • Cannot be a boot volume
  • 500 GiB - 16TiB
  • Max IOPS is 250
  • Max throughput of 250 MiB/s – can burst
54
Q

Can make Image (AMI) from Snapshot?

A

True

55
Q

EBS volumes restored by snapshots need to be?

A

Pre warmed

56
Q

EBS Snapshots can be automated using

A

Amazon Data Lifecycle Manager

57
Q

EBS backups use IO and you shouldn’t run them while your application is handling a lot of traffic

A

True

58
Q

Max EBS snapshots?

A

100k

59
Q

Can’t copy EBS Snapshots across AZ or Region?

A

False

60
Q

How to migrate EBS volume to different AZ?

A
  • Snapshot the volume
  • (optional) Copy the volume to a different region
  • Create a volume from the snapshot in the AZ of your choice
61
Q

How to encrypt an unencrypted EBS volume?

A
  • Create an EBS snapshot of the volume
  • Encrypt the EBS snapshot ( using copy )
  • Create new ebs volume from the snapshot ( the volume will also be encrypted )
  • Now you can attach the encrypted volume to the original instance
62
Q

Instance Store is another type of network drive?

A

False - It’s physically attached

63
Q

What are the pros and cons of Instance Store?

A
  • Pros:
  • Better I/O performance
  • Good for buffer / cache / scratch data / temporary content • Data survives reboots
  • Cons:
  • On stop or termination, the instance store is lost
  • You can’t resize the instance store
  • Backups must be operated by the user
64
Q

What if you want to increase IOPS to say 100 000 IOPS? What if you want to mirror your EBS volumes?

A

You would mount volumes in parallel in RAID settings!

65
Q

Difference btw RAID 0 and RAID 1?

A

RAID 0 (increase performance) - RAID 1 (increased fault tolerance)

66
Q

What’s Elastic File System (EFS)?

A
  • Managed NFS (network file system) that can be mounted on many EC2 • EFS works with EC2 instances in multi-AZ
  • Highly available, scalable, expensive (3x gp2), pay per use
67
Q

Use Cases of EFS?

A

Use cases: content management, web serving, data sharing,Wordpress

68
Q

Uses ____ to control access to EFS

A

Security Groups

69
Q

Only compatible with Windows based AMI?

A

False - Only Linux

70
Q

Root EBS Volumes of instances get terminated by default if the EC2 instance gets terminated. (you can disable that)

A

True

71
Q

EFS can mount only 1 instance?

A

False - can mount 100’s

72
Q

How Many RDS Read replicas for read scalability?

A

Up to 5

73
Q

Read Replicas can be within AZ, Cross AZ, or Cross Region?

A

True

74
Q

Replication for RDS is not ASYNC and is instantly available?

A

False - It Is ASYNC so reads are eventually consistent

75
Q

Replicas can be promoted to their own DB?

A

True

76
Q

Apps must update ____ to leverage read replicas?

A

connection string

77
Q

RDS Multi AZ is what kind of replication? SYNC or ASYNC?

A

SYNC

78
Q

What’s the point of RDS Multi AZ?

A

Not used for scaling
• Increase availability
• Failover in case of loss of AZ, loss of network, instance or storage failure
• No manual intervention in apps

79
Q

RDS Backups are automatically enabled in RDS?

A

True

80
Q

Give some features of Automated Backups.

A
  • Daily full snapshot of the database
  • Capture transaction logs in real time
  • => ability to restore to any point in time
  • 7 days retention (can be increased to 35 days)
81
Q

RDS allows for encryption using?

A

AWS KMS - AES-256 encryption

82
Q

In Flight data encryption using?

A

SSL certificates

83
Q

How do you enforce SSL using PostGreSQL and MySQL?

A

PostgreSQL: rds.force_ssl=1 in the AWS RDS Console (Paratemer Groups)

MySQL: Within the DB:
GRANT USAGE ON . TO ‘mysqluser’@’%’ REQUIRE SSL;

84
Q

How do you connect using SSL to RDS?

A

Provide the SSLTrust certificate (can be download from AWS) Provide SSL options when connecting to database

85
Q

RDS DB’s are usually deployed in a public subnet.

A

FALSE - usually deployed in a private subnet

86
Q

RDS Security works by leveraging ____?

A

Security Groups - it controls who can communicate with RDS

87
Q

IAM Policies help do what for RDS?

A

Who can manage AWS RDS

88
Q

A traditional username and password and IAM users can be used to login to the DB?

A

True

89
Q

What two SQL languages are supported with Aurora?

A

Postgres and MySQL

90
Q

Aurora storage automatically grows in what increments and up to what size?

A

10GB, up to 64TB

91
Q

Aurora can have up to how many replicas what what’s the replica lag?

A

Up to 15 replicas and 10 ms replica lag

92
Q

Failover is Aurora is not instantaneous?

A

False

93
Q

How do you encrypt an unencrypted RDS?

A

unencrypted DB => snapshot => copy snapshot as encrypted => create DB from snapshot

94
Q

RDS automatically enabled encryption at rest?

A

True - Is done only when you first create the DB instance

95
Q

What’s your responsibility with RDS?

A
  • Check the ports / IP / security group inbound rules in DB’s SG
  • In-database user creation and permissions
  • Creating a database with or without public access
  • Ensure parameter groups or DB is configured to only allow SSL connections
96
Q

What’s AWS responsibility for RDS?

A
  • No SSH access
  • No manual DB patching
  • No manual OS patching
  • No way to audit the underlying instance
97
Q

Amazon RDS supports Transparent Data Encryption for DB encryption? What kind of instances allow this?

A

• Oracle or SQL Server DB instance only

98
Q

Transparent Data Encryption (TDE) Can be used on top of KMS for RDS?

A

True - May affect performance

99
Q

IAM Authentication words for what kind of RDS instances?

A

Works for MySQL, PostgreSQL

100
Q

The lifespan of an IAM Auth token for RDS is how long?

A

15-minutes

101
Q

Where are IAM Auth tokens generated?

A

AWS Credentials

102
Q

SSL must be used when connecting to the RDS database?

A

True

103
Q

Easy to use EC2 ____ to connect to the RDS database

A

Instance Roles

104
Q

Aurora Serverless Only supports ___ ?

A

MySQL & Postgres

105
Q

Aurora serverless DB cluster starts, shutsdown and scallers automaticall based on?

A

CPU / Connections

106
Q

You can migerate from aurora cluster to serverless and viceversa?

A

True

107
Q

Aurora Serverless usage is measured in ?

A

ACU (Aurora Capacity Units)

108
Q

How are you billed using aurora serverless?

A

Billed in 5 minutes increment of ACU

109
Q

What is ElastiCache?

A

ElastiCache is to get managed Redis or Memcached

110
Q

How does ElastiCache help DB’s?

A

Helps reduce load off of databases for read intensive workloads

Helps make your application stateless

111
Q

Cache must have an __ __ to make sure only the most current data is used in there.

A

Invalidation Strategy

112
Q

Both Memcache and Redis survive reboots?

A

False - Only Redis

113
Q

Redis supports what kind of security login?

A

Redis Auth (username / Password)