AWS Concepts Flashcards
What is an EC2 Burstable Instance?
It means that the instance has an okay characteristic, but can ramp up the capabilities very fast if needed
You plan on running an open source MongoDB database year-round on EC2. Which instance launch mode should you choose?
Reserved Instances
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?
Dedicated hosts
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?
Scheduled Reserved Instances
What is load balancing?
Load balancers are servers that forward internet traffic to multiple servers (EC2 instances) downstream
What are some reasons to use a load balancer?
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;
What is an EC2 reserved instance?
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
What is Load Balancer stickiness?
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
What can you do to make sure a user doesn’t lose their session data on their server?
Use Load Balancer stickiness
What is Cross-Zone Load Balancing?
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
True or False: cross-zone load balancing is always on for Application Load Balancer and Classical Load Balancer?
False; Cross-Zone Load Balancing is always on for ALB (can’t be disabled) but not for CLB
What is SSL/TLS?
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
What is SNI?
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 does SNI work?
It requires the client to indicate the hostname of the target server in the initial SSL handshake
What does a de-registration delay in load balancing help with?
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
When you specify an average performance of a characteristic of an ASG (ex. ASG CPU to stay around 40%), what scaling policy is this?
Target Tracking Scaling
Example: When a CloudWatch alarm is triggered (CPU > 70%), then add 2 units.
What Scaling Policy is this an example of?
Simple / Step Scaling
You can anticipate usage patterns for ASG instances; what scaling policy should you use?
Scheduled Actions Scaling Policy
What is the purpose of a Scaling Cooldown?
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
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?
Look into the X-Forwarded-For header in the backend
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?
You create a CloudWatch custom metric and build an alarm on this to scale your ASG
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?
Open up the EC2 security on port 80 to the ALB’s security group
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?
Cross Zone Load Balancing
True or False: An EBS volume is locked to an AZ
True
What is the GP2 (SSD) EBS Volume
General purpose SSD volume that balances price and performance for a wide variety of workloads
What is the IO1 (SSD) EBS Volume
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.;
What is the ST1 (HDD) EBS Volume
Low cost HDD volume designed for frequently accessed, throughput-intensive workloads
What is the SC1 (HHD) EBS Volume
Lowest cost HDD volume designed for less frequently accessed workloads
What is a main difference of EBS vs Instance Store
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
If you need high IOPS would you use ESB or EC2 Instance Store?
EC2 Instance Store. It has much higher IOPS because it is a physical drive
Between EBS and EFS, which service can be mounted accross AZs?
EFS
What are the 6 relational databases that AWS RDS supports?
Postgres, MySQL, MariaDB, Oracle, Microsoft SQL Server and Aurora
How many read replicas can you have for RDS?
Up to 5. They can be Within AZ, Cross AZ or Cross Region. Up to 15 with Aurora.
Business users want analytics on data from an RDS database. What architecture change can we make?
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
Read replicas can be encrypted without master encryption.
False. The master must be encrypted for the read replicas to be encrypted and vice-versa.
How do we encrypt the master and read replicas at rest?
AWS KMS. Encryption is defined at launch time.