Section 8: AWS Fundamentals: RDS + Aurora + ElastiCache Flashcards
```
What does AWS RDS stand for, and what is it?
Amazon Web Services Relational Database Service. It’s a managed DB service for databases that use SQL as their query language.
Subsection: Amazon RDS Overview
Are RDS database managed by AWS?
Yes
Subsection: Amazon RDS Overview
Which types of databases can you use with an AWS RDS? (there are 6)
- PostgreSQL
- MySQL
- MariaDB
- Oracle
- Microsoft SQL Server
- Aurora (AWS Propriety database that will be discussed more in another section)
Subsection: Amazon RDS Overview
Relational Database Service is AWS managed. This means that when you use RDS, you get a lot of built in benefits that can make using RDS preferable to deploying a database on an EC2 instance. Which of the following, if any, is/are NOT one of the built in AWS managed benefits you get from using RDS? If any are false, what is the/are their true version(s)?
* A) Automated provisioning, OS patching
* B) Continuous backups and resore to specific timestamp (Point in Time Restore)
* C) Monitoring dashboards
* D) Read/write replicas for improved performance
* E) Multi AZ setup for Disaster Recovery
* F) Maintenance windows for upgrades
* G) Scaling capability (vertical and horizontal)
* H) Storage backed by EBS (gp2 or ioI)
* I) Ability to SSH into your instances
D) is false. RDS gives you read replicas for improved read performance. There is currently no such things as a write replica.
I) is false. You CANNOT ssh into the EC2 instances underlying your RDS.
Subsection: Amazon RDS Overview
What helps you increase storage on your Relational Database Service database dynamically by detecting when you are running out of free database storage and scaling automatically?
Did mention this might come up in the exam.
RDS - Storage Auto Scaling
Subsection: Amazon RDS Overview
Which of the following, if any, is/are untrue of Relational Database Service - Storage Auto Scaling? If any are false, what is the/are their true version(s)?
* A) You have to set a max storage threshold (max limit for db storage)
* B) Automatically modify storage if: Free storage is less than 10% of allocated storage; Low-storage lasts for at least 5 minutes; 6 hours have passed since last modification
* C) Not useful for application with unpredictable workloads
* D) Supports all RDS database engines (PostgreSQL, MySQL, MariaDB, Oracle, Microsoft SQL Server)
C) is false. RDS Storage Auto Scaling is useful for apps with unpredictable workloads.
Perhaps this one is exam relevant?
Subsection: Amazon RDS Overview
RDS read replicas vs multi AZ
Which is a use case for an RDS read replica, and which is a use case for multi AZ?
extremely important for exam!
Subsection: Amazon RDS Overview
Do Relational Database Systems help you to scale your reads?
extremely important for exam!
Yes
Subsection: Amazon RDS Overview.
Which of the following, if any, is/are untrue about Relational Database Read Replicas? If any are false, what is the/are their true version(s)?
* A) Up to 10 Read Replicas
* B) Within AZ, Cross AZ or Cross Region
* C) replicas are asynchronous
* D) Replicas can become their own database (you can write to them too, if they become their own database)
* E) Applications must update the connection string to leverage read replicas.
* F) Reads and Writes are performed only on the main RDS DB instance
A) is untrue. You can have up to fifteen read replicas
Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!
Read replicas are asychronous. This means that changes to your main database eventually get copied over to your Read Replicas. This also means that it’s possible that your application will try to read from a read replica and get stale data (data that is no longer matching the up-to-date data that is in your main RDS). So, would using RDS Read Replicas be good choice if your app needed to use real time data?
I wouldn’t think so. Or, I’d at least want to check how far behind the read replicas are from the main RDS, but mostly, I don’t think RDS Read Replicas would be a good fit for an application that needed real time data.
Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!
Would the following be a good use case for a Relational Database Service Read Replica? If so, could you describe the flow?
You have a production application and you want to create a reporting application/run some analytics.
Yes. Your production application reads/writes to your RDS DB instance. Then through asynchronous replication, that data gets copied over to your RDS DB instance read replica. Then your reporting application doesn’t need to bother you rmain RDS DB instance at all, it can get everything it needs by reading from the RDS DB instance read replica.
Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!
True/False:
If your RDS Read Replica is within the same region (ex, us-east), you don’t have to pay for transferring data from one AZ to another (ex, us-east-1a to us-east-1b).
True.
Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!
True/False:
You incur a cost if you attempt to use a cross-region read replica. That is, you incur a cost if your RDS Read Replica is not within the same region as your RDS DB instance (ex, us-east-1a to eu-west-1b).
True
Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!
Regarding RDS Multi AZ (Disaster Recovery) (also called an RDS DB instance standby)
Which of the following, if any, is/are false? If any are false, what is the/are their true version(s)?
- A) Sync replication
- B) One DNS name - automatic app failover to standby
- C) increased availability
- D) Failover in case of loss of AZ, loss of network, instance or storage failure
- E) No intervention needed in aps
- F) Used for scaling
F) is false. RDS Multi AZ (Disaster Recovery) is not, by itself used for scaling. However, you can set up Read Replicas as Multi AZ for Disaster Recovery, so that if your main RDS DB instance goes down, one of your Read Replicas will become your main RDS DB instance (and you’ll be able to write to it).
Also, when we say “one DNS name”, we mean that your DNS name first goes to your main RDS DB, and that if for some reason your main RDS DB is unavailable, the same DNS name will eventually take your application to your RDS DB standby instance.
Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!
True/False. Bonus points for guessing any parts of the additional notes.
You can set up a Read Replica as Multi AZ for Disaster Recovery
True. if your main RDS DB instance goes down, one of your Read Replicas will become your main RDS DB instance (and you’ll be able to write to it) your one DNS name will route to your new main RDS DB instance instead of routing to the broken one.
Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!
As an answer to the question of “How do we make an RDS database go from single AZ to Multi AZ?” (a process which, btw, has zero downtime), are the following steps in the correct order:
* A) Click on ‘modify’ for the database.
* B) Then a snapshot will be taken of your main RDS DB instance.
* C) Then a new DB is restored (created) from your snapshot in a new AZ. This is your new “standby DB”
* D) Then synchronization is established betwen the two databases (I beleive the idea is that now what’s in your standby db will continually be brought to match what’s in your main RDS DB.
Yes
Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!
Which of the following, if any, is/are false? If any are false, what is the/are their true version(s)?
- A) Aurora is AWS propriety tech, cloud optimized and claims 5x performance of MySQL on RDS, and 3x the performance of Postgres on RDS.
- B) Aurora storage starts at 10GB and grows automatically as needed up to 128 TB.
- C) Aurora can have up to 15 replicas and the replication process is faster than MySQL (sub 10 ms replica lab)
- D) Failover in Aurora is instantaneous, it’s high availability (HA) native
- E) Aurora costs no more than the other RDS database types
- E) is false. Aurora costs more than RDS (20% more (I assume me means that of the RDS options, Aurora costs of the most)) - but it’s more efficient.
Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )
Which of the following, if any, is/are false? If any are false, what is the/are their true version(s)?
- A) Aurora is AWS propriety tech, cloud optimized and claims 5x performance of MySQL on RDS, and 3x the performance of Postgres on RDS.
- B) Aurora storage starts at 10GB and grows automatically as needed up to 64 TB.
- C) Aurora can have up to 15 replicas and the replication process is faster than MySQL (sub 10 ms replica lab)
- D) Failover in Aurora is configurable
- E) Aurora costs more than RDS (20% more (I assume me means that of the RDS options, Aurora costs of the most)) - but it’s more efficient.
B and D are false! Aurora storage starts at 10GB and grows automatically as needed up to 128 TB (2^7). Also, failover in Aurora is instantaneous - it’s high availability (HA) native.
Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )
Every time you make a change to your database, Aurora synchronously (automatically/instantaneously) creates 6 new copies of the whole database across 3 AZ.
Which of the following, if any, is/are false about this process? If any are false, what is the/are their true version(s)?
* A) 4 copies out of 6 are needed for writes
* B) 4 copies out of 6 are needed for reads
* C) Self healing with peer-to-peer replciation
* D) Storage is striped across 100s of volumes
B) is false. Three out of 6 copies are needed for reads. Here’s the whole quote about the confusing parts of this:
“Aurora stores copies of the data in a DB cluster across multiple Availability Zones in a single AWS Region. Aurora stores these copies regardless of whether the instances in the DB cluster span multiple Availability Zones. For more information on Aurora, see Managing an Amazon Aurora DB cluster.
When data is written to the primary DB instance, Aurora synchronously replicates the data across Availability Zones to six storage nodes associated with your cluster volume. Doing so provides data redundancy, eliminates I/O freezes, and minimizes latency spikes during system backups. Running a DB instance with high availability can enhance availability during planned system maintenance, and help protect your databases against failure and Availability Zone disruption. For more information on Availability Zones, see Regions and Availability Zones.”
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.AuroraHighAvailability.html
Note that these copies are not the same as Read Replicas. It seems as though the 6 copies are not used unless something bad happens to your everything-else and then these 6 copies could be used, and that’s why they’re set up with the read/write permissions that they have.
Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )
Which of the following is/are false about Aurora? If any are false, what is the/are their true version(s)?
* A) Automated failover for main in less than 30 seconds.
* B) Master + up to 10 Aurora Read Replicas serve reads
* C) No support for Cross Region Replication
* D) one master/main Aurora instance that takes writes
B) and C) were false! muahahahah
Master + up to fifteen Aurora Read Replicas server reads
* There is support for Cross Region Replication
Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )
What are five important things to remember about Aurora DB Clusters?
- Writer Endpoint
- Reader Endpoint (Connection load balancing, as opposed to statement load balancing, though there’s a flashcard specifcally about this so I won’t count it as incorrect if you forgot this note)
- Shared Storage Volume
- Auto Expanding (10 GB to 128 TB)
- Auto Scaling (number of Read Replicas)
Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )
Are Aurora DB Clusters connection load balanced or statement load balanced?
Connection load balanced
Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )
Which of the following, if any, is/are false about Aurora DB Clusters? If any are false, what is the/are their true version(s)?
* A) Client Writes go to a Writer Endpoint that goes to the main Aurora DB instance
* B) Client Reads go to a Reader Endpoint that uses a Connection Load Balancer to distribute connections amonst Aurora DB Read Replicas
* C) Each db (main and the replicas) are auto expanding from 10GB to 128 TB
* D) All dbs (main and the read replicas) use a shared storage volume
* E) The Read Replicas can be set up to be Auto Scaling
So, I think that it’s D, and that what Stephane is saying is that all the dbs (main and the read replicas and, who knows, maybe even the 6n where n=NumberOfCopies) together use a shared storage volume that can be between 10GB and 128 TB in size.
Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )
So we’ve covered a lot of this already, but just to list out the list of features, which of the following, if any, is/are FALSE about Aurora? If any are false, what is the/are their true version(s)?
* A) Automatic failover
* B) Backup and recovery
* C) isolation and security
* D) industry compliance
* E) push-button scaling
* F) automated patching with zero downtime
* G) advanced monitoring
* H) routine maintenance
* I) backtrack (restore data at any point of time without using backups)
* J) completely free!
J is false. There might be some free tier eligible stuff, but overall, Aurora is not free.
Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )
Which of the following, if any, is/are false about Relational Database Service and Aurora Security? If any are false, what is the/are their true version(s)?
* A) At rest encryption: db master and replicas encryption using AWS KMS - must be defined at launch time; if master is not encrypted, read replicas cannot be encrypted; to encrypt an un-encrypted database, go through a DB snapshot & restore as encrypted
* B) In-flight encryption (SSL-ready by default, use the AWS TLS root certificate client-side )
* C) IAM Authentication: IAM roles to connect to your db (you could do username/password too, but IAM is preferred)
* Security Groups
* No SSH (except on RDS Custom)
* Audit Logs can be enabled (and sent to CloudWatch Logs for longer retention)
B is false!
In-flight encryption takes place and is TLS ready by by default, not SSL ready by default (idk if you can use SSL at all here). Must use the AWS TLS root certificate client-side.
Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )
Which of the following, if any, is/are false about Amazon RDS Proxy? If any are false, what is the/are their true version(s)?
* A) Minimize and pool connections on your RDS database EC2 instance
* B) minimize failover time (reduce by 75%)
* C) Can choose between IAM authentication and username/password
A) is False. Amazon RDS Proxy helps you minimize and pool connections on your RDS database instance. There’s no EC2 instance underlying your RDS database (or if there is, it’s not something to which you have access or something you need to worry about).
B) is False. Amazon RDS Proxy hels you minimize failover time and reduces it by 66%!
C) is False. Amazon RDS Proxy enforces IAM authentication for your database and securely stores credentials in AWS Secrets Manager
Subsection: RDS Proxy
If any of the following are untrue about Amazon RDS Proxy, what are their true versions? (Card 1 of 2)
- A) Mostly managed database proxy for RDS
- B) Allows apps to pool and share DB connections established with the databse
- C) Improves db efficiency by reducing the stress on db resources (CPU, RAM) and minimize open connections and timeouts
- D) Serverless, autoscaling and highly available (multi-AZ)
- E) Reduced RDS & Aurora failover time by up to 66%
A) is False. Amazon RDS Proxy is a fully manged database proxy for RDS
Subsection: RDS Proxy
If any of the following are untrue about Amazon RDS Proxy, what are their true versions? (Card 2 of 2)
- A) Supports the usual RDS db types (MySQL, PostgreSQL, MariaDB, MS SQL Server, Oracle, Aurora-MySQL and Aurora-PostgreSQL)
- B) No code changes required for most apps
- C) Option to use IAM Authentication or username/password to connect to database
- D) RDS Proxy is never publically accessible (must be accessed from VPC)
A) is False. Amazon RDS Proxy supports the RDS db types MySQL, PostgreSQL, MariaDB, MS SQL Server, Aurora-MySQL and Aurora-PostgreSQL. Neither Stephane nor an AWS page about RDS Proxy mention Oracle.
https://aws.amazon.com/rds/proxy/
C) * is false. Enforce IAM Authentication for DB and securely store credentials in AWS Secrets Manager
Subsection: RDS Proxy