AWS Concepts Flashcards

1
Q

What is an EC2 Burstable Instance?

A

It means that the instance has an okay characteristic, but can ramp up the capabilities very fast if needed

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

You plan on running an open source MongoDB database year-round on EC2. Which instance launch mode should you choose?

A

Reserved Instances

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

You would like to deploy a DB and the vendor license bills you based on the physical cores and underlying socket visibility. Which EC2 launch modes allow you to get visibility into them?

A

Dedicated hosts

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

You are running a critical workload of three hours per week, on Monday. Which EC2 Instance Launch Type should you choose to maximize the cost savings while ensuring the application stability?

A

Scheduled Reserved Instances

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

What is load balancing?

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
6
Q

What are some reasons to use a load balancer?

A

Expose a single point of access (DNS) to your application;
Handle failures of downstream instances;
Provide SSL termination (HTTPS) for your websites;
Enforce Stickiness with cookies;
High availability across zone (can forward to instances in different AZs)
Separate public traffic from private traffic;

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

What is an EC2 reserved instance?

A

A reserved instance is the same as the On-Demand, however, because you have reserved it for a set period of time, it is heavily discounted

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

What is Load Balancer stickiness?

A

It is when the same client is always redirected to the same instance behind a load balancer;
There is a cookie that has an expiration date you control

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

What can you do to make sure a user doesn’t lose their session data on their server?

A

Use Load Balancer stickiness

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

What is Cross-Zone Load Balancing?

A

Each load balancer instance distributes evenly across all registered instances in all AZ;
otherwise, each load balancer node distributes requests evenly across the registered instances in its AZ

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

True or False: cross-zone load balancing is always on for Application Load Balancer and Classical Load Balancer?

A

False; Cross-Zone Load Balancing is always on for ALB (can’t be disabled) but not for CLB

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

What is SSL/TLS?

A
An SSL (Secure Socket Layer) Certificate allows traffic between your clients and your load balancer to be encrypted in transit (in-flight encryption);
TLS (Transport Layer Security) is the newer version
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is SNI?

A

Server Name Indication; it solves the problem of loading multiple SSL certificates onto one web server (to serve multiple websites);
Only works for ALB and NLB

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

How does SNI work?

A

It requires the client to indicate the hostname of the target server in the initial SSL handshake

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

What does a de-registration delay in load balancing help with?

A

A de-registration delay is set so that when an instance is being re-registered (or unhealthy), the load balancer can still have time to send “in-flight” requests to the target;
however new requests are not sent to the instance

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

When you specify an average performance of a characteristic of an ASG (ex. ASG CPU to stay around 40%), what scaling policy is this?

A

Target Tracking Scaling

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

Example: When a CloudWatch alarm is triggered (CPU > 70%), then add 2 units.
What Scaling Policy is this an example of?

A

Simple / Step Scaling

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

You can anticipate usage patterns for ASG instances; what scaling policy should you use?

A

Scheduled Actions Scaling Policy

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

What is the purpose of a Scaling Cooldown?

A

The cooldown period helps to ensure that your Auto Scaling 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
20
Q

Your application is using an Application Load Balancer. It turns out your application only sees traffic coming from private IP which are in fact your load balancer’s. What should you do to find the true IP of the clients connected to your website?

A

Look into the X-Forwarded-For header in the backend

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

Your boss wants to scale your ASG based on the number of requests per minute your application makes to your database. What do you do?

A

You create a CloudWatch custom metric and build an alarm on this to scale your ASG

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

A web application hosted in EC2 is managed by an ASG. You are exposing this application through an Application Load Balancer. The ALB is deployed on the VPC with the following CIDR: 192.168.0.0/18. How do you configure the EC2 instance security group to ensure only the ALB can access the port 80?

A

Open up the EC2 security on port 80 to the ALB’s security group

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

You are running an application in 3 AZ, with an Auto Scaling Group and a Classic Load Balancer. It seems that the traffic is not evenly distributed amongst all the backend EC2 instances, with some AZ being overloaded. Which feature should help distribute the traffic across all the available EC2 instances?

A

Cross Zone Load Balancing

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

True or False: An EBS volume is locked to an AZ

A

True

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

What is the GP2 (SSD) EBS Volume

A

General purpose SSD volume that balances price and performance for a wide variety of workloads

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

What is the IO1 (SSD) EBS Volume

A

Highest-performance SSD volume for mission-critical low-latency or high-throughput workloads which is I/O intensive;
Good for large DB workloads such as MongoDB, PostgreSQL, etc.;

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

What is the ST1 (HDD) EBS Volume

A

Low cost HDD volume designed for frequently accessed, throughput-intensive workloads

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

What is the SC1 (HHD) EBS Volume

A

Lowest cost HDD volume designed for less frequently accessed workloads

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

What is a main difference of EBS vs Instance Store

A

Instance store is physically attached to the machines (EBS is a network drive);
Data stored on the Instance Store is not persistent through instance stops, terminations or hardware failures.
We can also encrypt data in the EBS

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

If you need high IOPS would you use ESB or EC2 Instance Store?

A

EC2 Instance Store. It has much higher IOPS because it is a physical drive

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

Between EBS and EFS, which service can be mounted accross AZs?

A

EFS

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

What are the 6 relational databases that AWS RDS supports?

A

Postgres, MySQL, MariaDB, Oracle, Microsoft SQL Server and Aurora

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

How many read replicas can you have for RDS?

A

Up to 5. They can be Within AZ, Cross AZ or Cross Region. Up to 15 with Aurora.

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

Business users want analytics on data from an RDS database. What architecture change can we make?

A

Make a replica of the RDS DB instance so that the reporting application that draws analytics does not disrupt or overflow traffic to the RDS DB instance; instead it reads from the replica

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

Read replicas can be encrypted without master encryption.

A

False. The master must be encrypted for the read replicas to be encrypted and vice-versa.

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

How do we encrypt the master and read replicas at rest?

A

AWS KMS. Encryption is defined at launch time.

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

How do we encrypt the RDS in-flight?

A

SSL Certificates. Provide SSL options with trust certificate when connecting to the database

38
Q

You need to encrypt an un-encrypted RDS backup. How would you do it?

A

You can copy an unencrypted snapshot into an encrypted one.

39
Q

How would we encrypt an un-encrypted RDS database?

A

Create a snapshot. Copy the snapshot and enable encryption for the snapshot. Restore the database from the encrypted snapshot. Migrate applications to the new database and delete the old database

40
Q

What are IAM policies used for with AWS RDS?

A

It is used to decide who can manage the RDS;

Can be used to authenticate API calls to RDS;

41
Q

Which two DBs do IAM authentication work with?

A

MySQL and PostgreSQL

42
Q

What are the three benefits of IAM Authentication for RDS? What two databases support it?

A

Network in/out must be encrypted using SSL;
IAM to centrally manage users instead of managing access individually on each DB instance;
For applications running on Amazon EC2, you can use profile credentials specific to your EC2 instance to access your database instead of a password, for greater security;
MySQL and PostgreSQL;

43
Q

What are four responsibilities that fall on the user for RDS security?

A

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

44
Q

When faced with infrequent, intermittent or unpredictable workloads when it comes to AWS Databases, what should you use?

A

Aurora Serverless

45
Q

How is Aurora Global Database distributed?

A

There is 1 primary region (read/write) and up to five secondary regions (read only) and up to 16 read replicas per secondary region

46
Q

Explain User Session Store with ElastiCache

A

A user logs into any application instance. The application writes the session data to ElastiCache. The user hits another instance of the application and the instance can retrieve the data and the user does not have to re-authenticate.

47
Q

True or False: MemcacheD is non persistent and has no backup and restore

A

True

48
Q

True or False: Redis does not have backup and restore features

A

False

49
Q

What type of data is caching effective for?

A

Data that changes slow and few keys are frequently needed

50
Q

What is Lazy Loading / Cache-Aside / Lazy Population for ElastiCache?

A

It is when data is not stored in cache (a cache hit) it will read from the DB and then the application will write to the cache

51
Q

What are two cons for Lazy Loading Cache data?

A

Cache miss penalty that results in 3 round trips (noticeable delay for that request);
Stale data: data can be updated in the database and outdated in the cache

52
Q

What is a write through for ElastiCache?

A

When data is written to the Amazon RDS, it is also written to ElastiCache

53
Q

How can you mitigate missing data in Cache on a Write Through?

A

You can implement Lazy Loading strategy. That way, if you don’t find the data, it will go to the database.

54
Q

Cache eviction can occur in what three ways?

A

Delete the item explicitly;
Item is evicted because memory is full and it’s not recently been used;
You set an item time-to-live;

55
Q

Is data asynchronously or synchronously copied when Multi-AZ is enabled in RDS?

A

Synchronous (except for Aurora). RDS creates a primary DB Instance and synchronously replicates the data to the standby instance in a different AZ.

56
Q

Is data asynchronously or synchronously copied when a read replica is created?

A

Asynchronously

57
Q

What is a negative in doing Read Replicas in multi-AZ?

A

There is a network cost in going from one AZ to another

58
Q

What is the major differences between Multi-AZ for availability and Read Replicas

A

Multi-AZ for availability hosts a stand by instance that can not be read/write other than from the Master RDS instance. It is not used for scaling. Read replicas are used for scaling. They are async when written to. They can be used as backups, but are primarily there for easing burden on a master DB.

Read Replicas with Multi-AZ is now available. Your read replicas in another AZ can be used as a standby.

59
Q

Which Elesticache service is multi-threaded, Redis or Memcached?

A

Memcached. It is the only feature that Redis does not have

60
Q

For AWS Route 53, what are the most common records?

A

A (host name to IPv4), AAAA (host name to IPv6), CNAME (host name to host name) and Alias (host name to AWS resource)

61
Q

What is a DNS Records TTL?

A

Time to Live. It is a duration that is specified back to the client to be cached. Helps the load on the DNS. It is mandatory.

62
Q

A CNAME and Alias can point to a root hostname true or false?

A

False; an Alias can point to root and non-root but a CNAME must point to a non-root domain

63
Q

An alias must point a hostname to an AWS Resource true or false

A

True

64
Q

Multiple values are returned to the client using a simple routing policy. Which route is chosen?

A

It is chosen by random by the client

65
Q

You can attach health checks to a simple routing policy, true or false?

A

True

66
Q

What is a weighted routing policy?

A

It controls the percentage of the requests that go to a specific endpoint

67
Q

What is latency routing policy?

A

Redirect to the server that has the least latency close to us

68
Q

What three things can you monitor in a route53 health check?

A

Endpoint, status of other health checks, or state of a CloudWatch alarm

69
Q

What is a Failover Routing Policy?

A

Route 53 will perform a health check on a primary resource, and if unhealthy, will route to the secondary, disaster-recovery resource.

70
Q

What is Geo Location Routing Policy?

A

Routes the user based on location

71
Q

What is the difference between Geo Location Routing Policy and Latency Routing Policy?

A

Geo location does not care about latency. Users in latency can be sent to resources not in their nearest geo-location.

72
Q

Whats a reason you would choose Multi-Value routing policy over simple routing policy in Route53?

A

In Multi-Value, you can associate your routing records with a Route53 health check.

73
Q

What is a NAT Gateway?

A

It enables instances in a private subnet to initiate communication to the internet, but doesn’t allow the internet to initiate communication to the private subnet.

74
Q

You want only the load balancer to talk to your EC2 instances. How do we set this up?

A

You allow all traffic to flow through your load balancer. It is redirected to your target group. Change the security group of the EC2 (or Target Group?) to accept traffic from ELB in the Source field.

75
Q

What is a Target Group in EC2?

A

A Target Group tells the load balancer where to direct to a group of instances based on path, hostname or query string and headers

76
Q

What is the purpose of Network Load Balancers?

A

To forward TCP & UDP traffic to your instances

77
Q

How many static IPs per AZ do Network Load Balancers have?

A

One

78
Q

Load Balancers provide a static IPv4 address, true or false?

A

False. They provide a static DNS.

79
Q

You are running a website with a load balancer and 10 EC2 instances. Your users are complaining about the fact that your website always asks them to re-authenticate when they switch pages. You are puzzled, because it’s working just fine on your machine and in the dev environment with 1 server. What could be the reason?

A

The Load Balancer does not have stickiness enabled

80
Q

Your application is using an Application Load Balancer. It turns out your application only sees traffic coming from private IP which are in fact your load balancer’s. What should you do to find the true IP of the clients connected to your website?

A

Look into the X-Forwarded-For header in the backend

81
Q

Application Load Balancers handle TCP, true or false?

A

False

82
Q

I have an ASG and an ALB, and I setup my ASG to get health status of instances thanks to my ALB. One instance has just been reported unhealthy. What will happen?

A

The ASG will terminate the EC2 Instance. Remember, the ELB is not in charge of scaling instances.

83
Q

Scaling an instance from an r4.large to an r4.4xlarge is called

A

Vertical Scaling

84
Q

You would like to expose a fixed static IP to your end-users for compliance purposes, so they can write firewall rules that will be stable and approved by regulators. Which Load Balancer should you use?

A

Network Load Balancer. The Network Load Balancer exposes a static IP, whereas an Application or Classic Load Balancer expose a static DNS (URL)

85
Q

Your application load balancer is hosting 3 target groups with hostnames being users.example.com, api.external.example.com, and checkout.example.com. You would like to expose HTTPS traffic for each of these hostnames. How do you configure your ALB SSL certificates to make this work?

A

Use SNI. Server Name Indication is a feature allowing you to expose multiple SSL certs if the client supports it

86
Q

Your Application Load Balancer (ALB) currently is routing to two target groups, each of them is routed to based on hostname rules. You have been tasked with enabling HTTPS traffic for each hostname and have loaded the certificates onto the ALB. Which ALB feature will help it choose the right certificate for your clients?

A

Server Name Indication (SNI)

87
Q

An application is deployed with an Application Load Balancer and an Auto Scaling Group. Currently, the scaling of the Auto Scaling Group is done manually and you would like to define a scaling policy that will ensure the average number of connections to your EC2 instances is averaging at around 1000. Which scaling policy should you use?

A

Target Tracking

88
Q

What does a listener do in an ALB? What do the rules do?

A

It checks for connection requests from clients, using the protocol and port that you configure. The rules that you define for the listener determine how the load balancer routes requests to its registered targets.

89
Q

For EBS, when would you use HDD and when would you use SSD?

A

Use HHD when you want to optimize for large streaming workloads where the dominant performance attribute is throughput;
Use SSD when you want to optimize for transactional workloads involving frequent read/write operations with small I/O size, where the dominant performance attribute is IOPS;

90
Q

How do we enforce SSL encryption with PostgreSQL and MySQL?

A

Postgres in aws RDS console: rds.force_ssl=1

MySQL within db: GRANT USAGE ON . ‘mysqluser’@’%’ REQUIRE SSL;