Fundamentals-RDS,Aurora,ElastiCache Flashcards

1
Q

Amazon ____ is a managed DB service that allows you to create databases in the cloud that are managed by AWS.

A

RDS

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

List 7 database engines that are supported by Amazon RDS

A

Postgres, MySQL, MariaDB, Oracle, Microsoft SQL Server, IBM DB2, Aurora

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

Advantage of RDS vs deploying DB on EC2:
Because RDS is a managed service:
- automated provisioning, OS patching
- continous backups and restore to specific timestamp (Point in Time Restore)
- monitoring dashboards
- read replicas for improved read performance
- multi AZ setup for disaster recovery
- maintenance windows for upgrades
- scaling capability (vertical and horizontal)
- storage backed by EBS

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

One disadvantage of Amazon RDS is that you cannot ____ into your instances. Since they are managed services, you don’t have access to the underlying EC2 instance.

A

SSH

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

What RDS feature can help you increase storage on your RDS DB instance automatically when it detects you are running out of free database storage?

A

RDS - Storage Auto Scaling

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

When configuring RDS Storage Auto Scaling, you need to set a ____ that will be the maximum limit for DB storage.

A

Maximum Storage Threshold

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

Amazon RDS Storage Auto Scaling will automatically modify storage if:
- free storage is less than ____% of allocated storage
- low-storage lasts at least ____ minutes
- ____ hours have passed since the last modification

A

10
5
6

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

Amazon RDS Storage Auto Scaling is useful for applications with ____ workloads.

A

unpredictable

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

Which RDS database engines are supported with the Storage Auto Scaling feature?

A

all of them
Postgres, MySQL, MariaDB, Oracle, Microsoft SQL Server, IBM DB2, Aurora

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

You can have up to ____ read replicas when using Amazon RDS.

A

15
This provides read scalability.

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

Read replicas with Amazon RDS can be Within AZ, Cross AZ or Cross Region.

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

Amazon RDS replication is ____, so the reads are eventually consistent.

A

async

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

Amazon RDS read replicas can be ____ to their own DB.

A

promoted

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

In order to use Amazon RDS read replicas, the application must update the ____ to leverage the read replicas.

A

connection string

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

Use case for RDS Read Replicas:

  • You have a production database for the normal load
  • You want to run a reporting application for analytics
  • You create the read replica to run the reporting against and the production database is not impacted.
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Normally, there is a network cost when data goes from one AZ to another.
For RDS read replicas within the same ____, you don’t pay that fee.

A

region

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

RDS Multi AZ is used for disaster recovery by using ____ replication to a standby RDS DB instance.
This standby instance is not used/accessible unless there is a failover to it.

A

sync

No manual intervention in the apps.
Not used for scaling.

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

RDS Multi AZ provides automatic app failover by using one ____ name.

A

DNS

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

RDS Multi AZ ____ can be triggered in the case an AZ loss, network loss, instance or storage failure.

A

failover

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

An alternative RDS Multi AZ disaster recovery setup to using a standby DB instance, is to use your RDS ____ if they are located in separate AZs.

A

read replicas

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

With RDS, to convert from a Single-AZ to Multi-AZ, there is no need to stop the DB. It is a zero downtime operation.
You simply click the “modify” option for the database.

A

Behind the scenes, how does it work:

  • A snapshot is taken of the RDS DB instance
  • A new DB is restored from the snapshot in a new AZ
  • Synchronization is started between the two databases
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

With RDS ____, you have access to the OS and database customization.
Which two database engines are support by this feature?

A

Custom
Oracle and Microsoft SQL Server

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

RDS Custom allows access to the underlying database and OS so you can:
- configure settings
- install patches
- enable native features
- access the underlying EC2 instance using SSH or SSM Session Manager

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

When using RDS Custom, before you customize anything it is recommended that you do what two things?

A

deactivate automation mode
take a DB snapshot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Amazon ____ is a proprietary DB from AWS (not open source) that is compatible with Postgres and MySQL.
Aurora
26
Amazon Aurora is "AWS Cloud Optimized" and performance is 5x better than MySQL on RDS and 3x better than Postgres on RDS.
27
Amazon Aurora storage automatically grows in increments of __ GB, up to ___ TB.
10 128
28
Amazon Aurora can have up to __ read replicas and the replication process is faster than MySQL (sub 10 ms replica lag).
15
29
Failover in Amazon Aurora is ____ and is much faster than Multi AZ on RDS. It is also high availability natively.
instantaneous
30
Amazon Aurora costs about 20% ____ than RDS, but is more efficient especially at scale.
more
31
Amazon Aurora stores __ copies of your data across __ AZs - __ copies out of __ needed for ____ - __ copies out of __ needed for ____ - self healing with peer-to-peer replication - storage is striped across 100s of volumes
6,3 4,6, writes 3,6, reads
32
Amazon Aurora supports: - automated ____ for master in less than 30 seconds. - up to __ Aurora read replicas. - ____ replication
failover 15 Cross Region
33
Amazon Aurora uses a ____ endpoint that points to the master DB so you always know which DB is the master. This is done via a DNS. Amazon Aurora uses a ____ endpoint that points to all the read replicas via connection load balancing. Amazon Aurora's read replicas can ____ up to the maximum number of replicates allowed, 15. Amazon Aurora uses a ____ storage volume that can auto expand from 10GB to 128TB.
writer reader auto scale shared
34
Features of Amazon Aurora: - automatic fail-over - backup and recovery - isolation and security - industry compliance - push-button scaling - automated patching with zero downtime - advanced monitoring - routine maintenance - backtrack: restore data to any point in time without using backups
35
You can define a subset of Aurora replica instances as a ____ endpoint. This allows you to run analytical queries on specific replicas. Generally, the reader endpoint is not used after defining Custom Endpoints as you would create multiple custom endpoints to cover your replicas.
custom
36
Aurora Serverless: - automated database instantiation and auto-scaling based on actual usage - good for infrequent, intermittent or unpredictable workloads - no capacity planning needed - pay per second, can be more cost-effective
37
Global Aurora: Cross Region read replicas are useful for ____.
disaster recovery
38
Global Aurora: Aurora Global Database: - 1 primary region (read / write) - up to 5 secondary (read-only) regions, replication lag is less than 1 second - up to 16 read replicas per secondary region - helps for decreasing latency - promoting another region (for disaster recovery) has an RTO < 1 minute - typical cross-region replication takes less than 1 second
39
Aurora ____ enables you to add ML-based predictions to your applications via SQL. You don't need to have ML experience.
Machine Learning
40
Aurora ____ provides simple, optimized, and secure integration between Aurora and AWS ML services.
Machine Learning
41
What two AWS services support the Aurora Machine Learning feature?
Amazon SageMaker (use with any ML model) Amazon Comprehend (for sentiment analysis)
42
What are some use cases for Aurora Machine Learning?
fraud detection, ad targeting, sentiment analysis, product recommendations
43
What are the two backup options for an RDS database?
automated manual DB snapshot
44
RDS automated backups do a ____ fully backup of the database (during the backup window). Transaction logs are backed-up by RDS every ____. To disable the automated backups, you set the days of retention to ____. Automated backups provide the ability to restore to any point in time (from oldest backup to ____ ago)
daily 5 minutes 0 5 minutes
45
RDS ____ are manually triggered backups by the user. Unlike RDS automated backups that can only be kept up to 35 days, manual backups ____.
manual DB snapshots are kept as long as you want
46
RDS backup trick: Let's say you have a RDS database that you plan to have stopped for a long time. You still will be paying for that storage. Instead, take a manual snapshot of the RDS database and then delete it. This way you are only paying for the cheaper snapshot storage. Then just restore the database when you need to use it again.
47
Aurora automated backups can be retained from 1 to 35 days. Unlike RDS automated backups, they cannot be ____. Aurora manual DB snapshots are the same as RDS in that: - ? - ?
disabled manually triggered backups are kept as long as you want
48
Restoring an RDS / Aurora backup or a snapshot creates ____.
a new database
49
Restoring MySQL RDS database from S3 - create a backup of your on-premises database - store it on Amazon S3 (object storage) - restore the backup file onto a new RDS instance running MySQL
50
Restoring MySQL Aurora cluster from S3 - create backup of your on-premises database using Percona XtraBackup - store the backup file on Amazon S3 - restore the backup file onto a new Aurora cluster running MySQL
51
Aurora database ____ allows you to create a new Aurora DB cluster from an existing one.
cloning
52
Aurora Database cloning is faster than a ____.
snapshot and restore
53
Aurora database cloning uses a ____ protocol: - initially, the new DB cluster uses the same data volume as the original DB cluster (fast and efficient - no copying needed) - when updates are made to the new DB cluster data, then additional storage is allocated and data is copied to be separated
copy-on-write
54
What Aurora feature is useful to create a "staging" database from a "production" database without impacting the production database?
Aurora Database Cloning
55
With ____ encryption, RDS master and replicas encryption using AWS KMS.
at-rest
56
When using at-rest encryption with RDS and Aurora, the encryption must be defined at ____.
launch time
57
With at-rest encryption for RDS and Aurora, if the ____ is not encrypted, then the read replicas cannot be encrypted.
master
58
To encrypt an un-encrypted RDS / Aurora database, you must perform what steps?
take a DB snapshot and restore as encrypted
59
Amazon RDS provides ____ encrpytion by default with TLS. You can use the AWS TLS root certificates client-side.
in-flight
60
Using ____, you can use Roles to connect to your database (instead of username/pw).
IAM Authentication
61
____ control network access to your RDS / Aurora DB.
security groups
62
There is no SSH available on RDS / Aurora except on RDS ____.
Custom
63
Audit logs can be enabled on RDS and sent to ____ logs for longer retention.
CloudWatch
64
Amazon RDS ____ is a fully managed database proxy for RDS.
Proxy
65
Amazon ____ allows apps to pool and share DB connections established with the database.
RDS Proxy
66
Amazon RDS Proxy can improve database efficiency by reducing stress on ____ and minimize ____.
database resources (CPU, RAM, etc) open connections (and timeouts)
67
Features of Amazon RDS Proxy: - serverless - auto scaling - highly available (multi-AZ)
68
Amazon RDS Proxy can reduce RDS / Aurora failover time by up to 66%.
69
Amazon RDS Proxy supports: - RDS: MySQL, PostgreSQL, MariaDB, MS SQL Server - Aurora: MySQL, PostgreSQL
70
No code changes are required in most apps to use Amazon RDS Proxy. Just point the database connection to the proxy.
71
Amazon ____ allows you to enforce IAM authentication for DB, and securely store credentials in AWS Secrets Manager.
RDS Proxy
72
The RDS Proxy is never ____ accessible.
publicly only accessible from VPC
73
Use RDS Proxy to pool connections from ____ functions to reduce timeouts and open connections.
Lambda
74
The three main uses for Amazon RDS Proxy: - minimize and pool connections on RDS instances - reduce RDS failover time - enforce IAM authentication for DB
75
Amazon ____ is a way to get managed Redis or Memcached databases.
ElastiCache
76
____ are in-memory databases with really high performance, low latency. They help to reduce the load off databases for read intensive workloads. Helps make your application stateless.
Caches
77
With Amazon ____, AWS takes care of OS maintenance / patching, optimizations, setup, configuration, monitoring, failure, recovery and backups for in-memory databaeses.
ElastiCache
78
Using ElastiCache involves heavy ____ changes.
application code
79
ElastiCache Solution Architecture - DB Cache Applications query ElastiCache, if not available, get from RDS and store in ElastiCache. Cache must have an ____ strategy to make sure only the most current data is used.
invalidation
80
ElastiCache Solution Architecture - User Session Store (making application stateless) - user logs into any of the application - the application writes the session data into ElastiCache - the user hits another instance of the application - the instance retrieves the data and the user is already logged in
81
Redis vs Memcached
82
ElastiCache supports IAM Authentication for ____ only, for the rest you use username/password.
Redis
83
IAM policies on ElastiCache are only used for AWS ____ security.
API-level
84
Memcached with ElastiCache supports ____-based authentication.
SASL
85
With Redis AUTH: - you can set a "password/token" when you create a Redis cluster - provides an extra level of security for your cache (on top of security groups) - supports SSL in-flight encryption
86
Which ElastiCache loading pattern is described: All the read data is cached, data can become stale in cache. Only when you don’t find data in cache do you then load ElastiCache. a) lazy loading b) write through c) session store
lazy loading
87
Which ElastiCache loading pattern is described: Adds or update data in the cache when written to a DB (no stale data) a) lazy loading b) write through c) session store
write through
88
Which ElastiCache loading pattern is described: store temporary session data in a cache (using TTL features) a) lazy loading b) write through c) session store
session store
89
Redis ____ guarantee both uniqueness and element ordering. Each time a new element is added, it is ranked in real time, then added in the correct order. Very userful for gaming leaderboards.
sorted sets
90
You should be able to differentiate between an Important (HTTPS - port 443) and a database port (PostgreSQL - port 5432) : Important Ports: - FTP: 21 - SSH: 22 - SFTP: 22 - HTTP: 80 - HTTPS: 443 RDS Database Ports: - PostgreSQL: 5432 - MySQL: 3306 - Oracle RDS: 1521 - MSSQL Server: 1433 - MariaDB: 3306 - Aurora: 5432 (if PostgreSQL compatible) or 3306 (if MySQL compatible)