AWS RDS Flashcards
What is RDS service?
It is a managed database service, supporting, MySQL Aroura Postgress Oracal MsSQL MariaDB
When it comes to users, what is the AWS RDS best practice?
We need a single user for each user accessing AWS RDS
I need to ensure my RDS instance is providing the best possible security for my data at rest, what are my options?
By default, encryption is enabled for mist all but not all instance sizes (smaller instance sizes do not have encryption)
When data is encrypted at rest, where are keys managed?
Volumes are encrypted using managed AWS keys.
When encryption is enabled on AWS RDS are logs encrypted?
Yes, logs are encrypted.
When I encrypt an RDS DB and take a snapshot, is the snapshot encrypted?
Yes
When encryption is enabled and I take a backup of the RDS database, will the backup be encrypted?
Yes
When I encrypt the RDS database, is the read replicas encrypted?
Yes
When I encrypt the RDS database, who manages the keys?
AWS KMS
When I encrypt the RDS database, are logs encrypted?
Yes
When I encrypt the RDS database, can I copy the encrypted snapshot to another region?
No because the keys are only in one region.
What is TDE in RDS?
For RDS MSSql and Oracle databases, the data is encrypted before it is written to the underlying storage device.
With TDE with RDS Oracle, do I need external key management?
Yes a KMS or CloudHSM
With TDE with RDS MSSQL, where is the encryption key stored?
It is managed by RDS after enabling TDE.
If I want to use SSL with RDS, what do I need to do?
Just set up the client to use SSL as RDS has SSL enables on server end by default.
What is MariaDB?
It is a fork of the MySQL DB.
Can I have read replicas for MSSQL and Oracal?
No this is not supported
I need to create a read replica in a seperate region for MariaDB, is this possible?
Yers, read replicas are supported in seperate regions.
When data is replicated to a read replica in a different region is the data replicated using azync data replication?
Yes, async is used.
Can I have multipal read repliicas for a single master instance?
Yes, 100%
If I wnat a small RPO and RTO for a MariaDB RDS instrance how can this be asily acheived?
Using a read replica, the read replica will only be a few seconds behind the master.
How can I scale queries for RDS MariaDB?
You can scale the queries by creating read replicas and pushing queries to the read replicas.
For MariaDB, how many read replicas can I have?
5
For MariaDB, what is the max size DB you can have?
32TB
For MySQL, what is the max size DB you can have?
32TB
For MySQL, what is the max read replicas?
5
For MySQL and MultyAZ what will happen when your main DB fails?
Things will automatically failover to the replica in the other AZ.
For MySQL and MultyAZ, is the backup taken from the main DC or the replica?
From the replica.
For RDS I need to ensure that I can back up the database, do I use native backup tooling?
No, RDS provides automatic backup.
I have a MySQL instance in US East and I need to ensure that I have the lowest RPO and RTO for DR, what are my options?
I can create a replica of the database in another region, this will perform async writes to the replica DB.
For MSSQL can I have read replicas?
No
I need to scale an MSQL RDS instance, what are my options?
Read replicas are not supported, but you can increase instance size.
I have a MySQL database and I need to make a copy in another region, what is the best method?
Take a snapshot and instruct AWS to copy the same shot to another region for you.
I have an MSSQL database and I need to make a copy in another region, what is the best method?
Take a snapshot and instruct AWS to copy the same shot to another region for you.
For MSQL can I have automatic backups?
Yes
When you are copying an RDS snapshot, do you pay for interregion copy?
Yes you pay for the data between regions.
When you copy an RDS snapshot that is encrypted betworrn regions, do you keep the same KMS key?
No, you get an new KMS key in the destination region.
With MSSQL can I have high availability?
Yes, it used mirroring with automatic failover.
When a MySQL db fails in a multi az configuration, what will happen?
The replica will take over all functionas automaticaly.
When you select a MultiAZ instance of RDS, is the standby instance available to use?
No
What DB’s use MultiAZ Failover
-MSSQL
MariaDB
MySQL
Postgres
For MultiAZ RDS deployments is the replication synchronous or asynchronous?
synchronous, so once a write happens to the master DB you can be 100% sure it has also happened to the standby.
For MultiAZ deployments of RDS, is the database in other regions?
No, they are all in the same region but the master and standby are in separate Availability Zones.
When using MultiAZ RDS deployments, are backups performed from the master or standby? and why?
They are performed from the standby because that enables the master to be unaffected and serve traffic.
When using MultiAZ RDS deployments, can I use the standby for read-only traffic?
No, this stand buy is only for failover.
Can I convert an existing single instance of RDS into a MultiAZ deployment?
Yes
When using MultiAZ deployment and compared to a single instance is the write latency increased?
Yes, but an only very small amount.
When using MultiAZ how long does it take to failover to a standby instance?
60 - 120 sec.
I am using MultiAZ RDS instance and a failover just happened, what does my application have to do to establish a new connection?
My application has to do a new DNS resolve as AWS changes the DNS entry to point to the standby instance IP. Failing to lookup the DB instance will cause your application to try to connect to the old IP of the failed master.
I have a JAVA application that caches DNS lookups for database connections, this application is connected to a MultiAZ RDS database, a failover happens, do you see an issue?
Yes, as the DNS entry is cached, the application may use the old cashed DNS lookup and this will be wrong as AWS during the failover will have updated the DNS record to point to the standby instance.
What can cause a RDS instance failover?
- An Availability Zone outage
- The primary DB instance fails
- The DB instance’s server type is changed
- The operating system of the DB instance is undergoing software patching
- A manual failover of the DB instance was initiated using Reboot with failover
I need to know when an RDS instance fails over, how can I achieve this?
RDS uses NSN to notify you of events.
How can I stop the RDS DB been easily deleted?
Enable database protection
For RDS, what is a subnet group?
It is a group of subnets that RDS will place instances of the database in?
I need to get notified of events that occur in my RDS instance, how can I achieve this?
RDS has events subscriptions where you can select to send events to and ARN, email or SNS
How can I easily see RDS events from the console?
In RDS section there are Events that enables you to see all events.
For Oracle how can I import data?
Use Oracle DB pump to import from,
-Oracle EC2 to RDS Oracle DB instance
-Oracle to another Oracle instance
On-prem DB to RDS Oracle
Dose Oracal support cross region replication?
No
For small Oracle DB how can I import data?
Oracle SQL developer
How can I backup data from on-prem to AWS S3 for Oracle?
RMAN
For AWS based Oracle servers how do I perform a backup?
Use AWS native snapshot
For Oracle EC2 how would I backup?
Use RMAN
What is RMAN?
It is oracle remover manager, used for backup and recovery.
I need to backup my MySQL DB, what options do I have?
You can use the native AWS incremental backup.
Are RDS backups turned on by default?
Yes
When RDS is backing up you RDS DB, what is it doing?
A incremental volume snapshot
How long can I set the incremental backups of RDS?
35days
How often are backups preformed?
Once a day
What is the default retention period?
Deffault 7 but can be upto 35 days
I have added some data to my DB about 1hr ago thta messed up my data, what options do I have?
Use point in time restore or restore from a backup, that backup is only taken one a day and while you have a running DB you can do a point in time restore from any time.
I am about to preform some sensitive data maintenance thta cust cause issues whit my DB, what can I do to ensure I can role back?
Preform a snapshot of the database.
I have a database and I need to share a copy with another account, what is the best way to do this?
Take a snapshot and you can share the snapshot with another account as sharing of snapshots is supported.
I need to create a DB in another region, I can do it offline, what options do I have?
I can create a snapshot of the database and copy to another region can create a new database from the snapshot.
When you are creating a new RDS DB, how many subnets do you need for a production MultiAZ RDS Instance?
You need two and they have to be added to a subnet group for the creation of the RDS instance.
Do I need a licence for RDS MySQL?
No
How do I scale an RDS MySQL database?
I can not vertically scale the database but I can scale horrazantally
I am starting to run out of storage in my RDS instance, what options do I have?
I can increase the storage size through the console, CLI or API.
I am increasing the RDS storage through the console, will this action take the database down?
No
I notice that I am reaching the max for the instance CPU and RAM, what options do I have?
I can increase the instance size to get more CPU and RAM.
I am increasing the size of an instance, will this tale the DB offline?
Yes as the OS has to be reset/
I need to have redundancy for my RDS database, what options do I have?
You can deploy the database in more than one AZ, this will give you a replica for the main instance, and in the event of a failover, it will take 60 to 120 seconds for failover to happen.
When failover happens for an RDS instance, is it the IP that gets mapped over to the new instance?
No, AWS chnages the DSN name, this means thet you need to be looking at the TTL to ensure you do a DNS lookup to gte the new IP.
I need to scale my MySQL/Maria DB, what are my options?
For reads you can have read replicas. You would still be limited to inserts, updates and deletes.
Is aurora MySQL compatable?
Yes it supports MySQL and Postgress
Is aurorapostgress compatable?
Yes it supports MySQL and Postgress
Is aurora a hot standby or a cluster?
It’s not a hot stand, it a cluster but there is only one write node the other are read nodes.
What is a RDS parameter group?
It is a container of parameters thet applies to more or more databases.
When you change a parameter in the parameter group, what effect will it have on an instance?
for static parameters the database needs to restart for the parameter to be loaded. For dynamic parameters thet will be applied to the DB automaticaly.
How much faster is aurora DB?
- 9x faster for MySQL
- 3x faster for Postgress
I am selecting a database for a new application, I need to have continious backup to s3, what are my options?
Use aurora as it can continous backup to s3.
I am designing an application and database and need at least 15 read replicas, what options do I have?
Use aurora as it supports upto 15 read replicas.
I am designing an application and selecting a database, I need a database with multipal masters, what options do I have?
Aurora.
I am designing an application with database, I wnat to keep my costs low and require a mySQL compatable database, I have varable workload, some times zero for long periods, what options do I have?
Aurora serverless as it can scale to noting where i am onnly paying for storage.
With aurora serverless, what am i paying for?
You are paying for,
- compute time used
- storage
- IOPs used
How often are automatic backups taken?
One a day and retained for 35 days.
As backups are only taken once a day, dose this means thta I can only restore to the backup point as was taken once a day?
No, when you pick a point in time, to restore, AWS will restore to the previous taken backup and tensd play the transaction logs forwared to get to the point you wnat to restore to.
When you pict a point in time ot restore the RDS DB to , how is AWS geteting to any point in time?
They replay the logs from the backup.
I need to backup my database, with retention time of 6mts, what options do i have?
You will have to manual snapshot the database.
I need to make a copy of the database to another region, what options do i have?
I cna take a snapshot and use the copy functionality to copy it to another regiona.
I need to ensure regional DR for my database, what options do I have?
I an use a read replica in another region.
I can take a snapshot and copy to another region and restore when needed.
What is a cross region read replica?
This si where you have the master in one region and the read replica in another region. Dat is async copied between regions.
What is the database port for MySQL?
3306
When I have cross region replication of a database, is there lag?
Yes 100% dure to distance as 1ms havery 90miles.
Can I promote a read replica (both AZ and croiss region to be a master?
Yes 100%.
I have a single instance RDS DB, I am concerned about maintanbce update from both amazon and own operations teams causing outages, what options do i have to ensure DB is not down during maintabnce?
You should upgrade the database to be a MultiAZ database, this way when maintance is happening the DB will failover.
For AWS RDS Aurora DB, what DB engines are supported?
Postgres