AWS Certification: RDS Questions

Amazon Relational Database Service (Amazon RDS)

Overview
Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups. It frees you to focus on your applications so you can give them the fast performance, high availability, security and compatibility they need.
1. A company is hosting a MySQL database in AWS using the AWS RDS service. To offload the reads, a Read Replica has been created and reports are run off the Read Replica database. But at certain times, the reports show stale data. Why may this be the case?

A. The Read Replica has not been created properly.

B. The backup of the original database has not been set properly.

C. This is due to the replication lag.

D. The Multi-AZ feature is not enabled.

Answer

C. This is due to the replication lag.

An AWS Whitepaper on the caveat for Read Replicas is given below which must be taken into consideration by designers: Read Replicas are separate database instances that are replicated asynchronously. As a result, they are subject to replication lag and might be missing some of the latest transactions. Application designers need to consider which queries have tolerance to slightly stale data. Those queries can be executed on a Read Replica, while the rest should run on the primary node. Read Replicas can also not accept any write queries. For more information on AWS Cloud best practices, please visit the following URL: https://d1.awsstatic.com/whitepapers/AWS_Cloud_Best_Practices.pdf


2. A customer planning on hosting an AWS RDS instance, needs to ensure that the underlying data is encrypted. How can this be achieved? Choose 2 answers from the options given below.

A. Ensure that the right instance class is chosen for the underlying instance.

B. Choose only General Purpose SSD since only this volume type supports encryption ofdata.

C. Encrypt the database during creation.

D. Enable encryption of the underlying EBS Volume.

Answer

A. & C.

Encryption for the database can be done during the creation of the database. Also, you need to ensure that the underlying instance type supports DB encryption. For more information on database encryption, please refer to the below URL: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Encryption.html Encryption at Rest is not available for DB instances running SQL Server Express Edition. For more information on encryption, please refer to the below URL: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Encryption.html


3. A database is being hosted using the AWS RDS service. This database is to be made into a production database and is required to have high availability. Which of the following can be used to achieve this requirement?

A. Use Multi-AZ for the RDS instance to ensure that a secondary database is created inanother region.

B. Use the Read Replica feature to create another instance of the DB in another region.

C. Use Multi-AZ for the RDS instance to ensure that a secondary database is created inanother Availability Zone.

D. Uset he Read Replica feature to create another instance of the DB in anotherAvailability Zone.

Answer

C. Use Multi-AZ for the RDS instance to ensure that a secondary database is created inanother Availability Zone.

Option A is incorrect because the Multi-AZ feature allows for high availability across Availability Zones and not regions.

Options B and D are incorrect because Read Replicas can be used to offload database reads. But if you want high availability then opt for the Multi-AZ feature.

AWS Documentation mentions the following:

Amazon RDS Multi-AZ deployments provide enhanced availability and durability for Database (DB) Instances, making them a natural fit for production database workloads. When you provision a Multi-AZ DB Instance, Amazon RDS automatically creates a primary DB Instance and synchronously replicates the data to a standby instance in a different Availability Zone (AZ).

For more information on AWS RDS Multi-AZ, please visit the following URL:

https://aws.amazon.com/rds/details/multi-az/


4. An application currently consists of an EC2 Instance hosting a Web application. The Web application connects to an AWS RDS database. Which of the following can be used to ensure that the database layer is highly available?

A. Create another EC2 Instance in another Availability Zone and host a replica of thedatabase.

B. Create another EC2 Instance in another Availability Zone and host a replica of the Webserver.

C. Enable Read Replica for the AWS RDS database.

D. Enable Multi-AZ for the AWS RDS database.

Answer

D. Enable Multi-AZ for the AWS RDS database.

AWS Documentation mentions the following: Amazon RDS Multi-AZ deployments provide enhanced availability and durability for Database (DB) Instances, making them a natural fit for production database workloads. When you provision a Multi-AZ DB Instance, Amazon RDS automatically creates a primary DB Instance and synchronously replicates the data to a standby instance in a different Availability Zone (AZ). Each AZ runs on its own physically distinct, independent infrastructure, and is engineered to be highly reliable. In case of an infrastructure failure, Amazon RDS performs an automatic failover to the standby (or to a read replica in the case of Amazon Aurora), so that you can resume database operations as soon as the failover is complete. Since the endpoint for your DB Instance remains the same after a failover, your application can resume database operation without the need for manual administrative intervention. For more information on AWS RDS Multi-AZ, please visit the following URL: https://aws.amazon.com/rds/details/multi-az/


5. An application currently uses AWS RDS MySQL as its data layer. Due to recent performance issues on the database, it has been decided to separate the querying part of the application by setting up a separate reporting layer. Which of the following additional steps could also potentially assist in improving the performance of the underlying database?

A. Make use of Multi-AZ to setup a secondary database in another Availability Zone.

B. Make use of Multi-AZ to setup a secondary database in another region.

C. Make use of Read Replicas to setup a secondary read-only database.

D. Make use of Read Replicas to setup a secondary read and write database.

Answer

C. Make use of Read Replicas to setup a secondary read-only database.

AWS Documentation mentions the following:

Amazon RDS Read Replicas provide enhanced performance and durability for database (DB) instances. This feature makes it easy to elastically scale out beyond the capacity constraints of a single DB instance for read-heavy database workloads. You can create one or more replicas of a given source DB Instance and serve high-volume application read traffic from multiple copies of your data, thereby increasing aggregate read throughput

For more information on Amazon Read Replicas, please refer to the URL below.

https://aws.amazon.com/rds/details/read-replicas/


6. In Below are the requirements for a data store in AWS:

a) Ability to perform SQL queries b) Integration with existing business intelligence tools c) High concurrency workload that generally involves reading and writing all columns of a small number of records at a time Which of the following would be an ideal data store for the above requirements? Choose 2 answers from the options below.


A. AWS Redshift

B. AWS RDS

C. AWS Aurora

D. AWS S3

Answer

B. & C.

https://d0.awsstatic.com/whitepapers/AWS_Cloud_Best_Practices.pdfExplanation for Aurora:Amazon Aurora is a MySQL and PostgreSQL compatible relational database built for the cloud, that combines the performance and availability of high-end commercial databases with the simplicity and cost-effectiveness of open source databases. Aurora Multi-Master adds the ability to scale out write performance across multiple Availability Zones, allowing applications to direct read/write workloads to multiple instances in a database cluster and operate with higher availability.https://aws.amazon.com/rds/aurora/


7. In Your company currently has a set of EC2 Instances running a web application which sits behind an Elastic Load Balancer. You also have an Amazon RDS instance which is accessible from the web application. You have been asked to ensure that this architecture is self-healing in nature and cost-effective. Which of the following would fulfill this requirement? Choose 2 answers from the options given below.

A. Use CloudWatch metrics to check the utilization of the web layer. Use Auto ScalingGroup to scale the web instances accordingly based on the CloudWatch metrics.

B. Use CloudWatch metrics to check the utilization of the databases servers. UseAuto Scaling Group to scale the database instances accordingly based on theCloudWatch metrics.

C. Utilize the Read Replica feature for the Amazon RDS layer.

D. Utilize the Multi-AZ feature for the Amazon RDS layer.

Answer

A. & D.

The following diagram from AWS showcases a self-healing architecture where you have a set of EC2 servers as Web server being launched by an Auto Scaling Group. AWS Documentation mentions the following: Amazon RDS Multi-AZ deployments provide enhanced availability and durability for Database (DB) Instances, making them a natural fit for production database workloads. When you provision a Multi-AZ DB Instance, Amazon RDS automatically creates a primary DB Instance and synchronously replicates the data to a standby instance in a different Availability Zone (AZ). Each AZ runs on its own physically distinct, independent infrastructure, and is engineered to be highly reliable. In case of an infrastructure failure, Amazon RDS performs an automatic failover to the standby (or to a read replica in the case of Amazon Aurora), so that you can resume database operations as soon as the failover is complete. Since the endpoint for your DB Instance remains the same after a failover, your application can resume database operation without the need for manual administrative intervention. For more information on Multi-AZ RDS, please refer to the below link: https://aws.amazon.com/rds/details/multi-az/


8. In Your company is hosting an application in AWS. The application is read intensive and consists of a set of web servers and AWS RDS. It has been noticed that the response time of the application increases due to the load on the AWS RDS instance. Which of the following measures can be taken to scale the data tier? Choose 2 answers from the options given below.

A. Create Amazon DB Read Replicas. Configure the application layer to query the ReadReplicas for query needs.

B. Use Auto Scaling to scale out and scale in the database tier.

C. Use SQS to cache the database queries.

D. Use ElastiCache in front of your Amazon RDS DB to cache common queries.

Answer

A. & D.

AWS documentation mentions the following: Amazon RDS Read Replicas provide enhanced performance and durability for database (DB) instances. This replication feature makes it easy to elastically scale out beyond the capacity constraints of a single DB Instance for read-heavy database workloads. You can create one or more replicas of a given source DB Instance and serve high-volume application read traffic from multiple copies of your data, thereby increasing aggregate read throughput. Read replicas can also be promoted when needed to become standalone DB instances. For more information on AWS RDS Read Replica’s, please visit the below URL: https://aws.amazon.com/rds/details/read-replicas/ Amazon ElastiCache is a web service that makes it easy to deploy, operate, and scale an in-memory data store or cache in the cloud. The service improves the performance of web applications by allowing you to retrieve information from fast, managed, in-memory data stores, instead of relying entirely on slower disk-based databases. For more information on AWS ElastiCache, please visit the below URL: https://aws.amazon.com/elasticache/


9. You are performing a Load Testing exercise on your application hosted on AWS. While testing your Amazon RDS MySQL DB Instance, you notice that your application becomes non responsive when you reach 100% CPU utilization. Your application is read-heavy. What methods will help scale your data-tier to meet the application’s needs? Choose three answers from the options given below.

A. Add Amazon RDS DB Read Replicas, and have your application direct read queries tothem.

B. Add your Amazon RDS DB Instance to an Auto Scaling group and configure yourCloudWatch metric based on CPU utilization.

C. Shard your data set among multiple Amazon RDS DB Instances.

D. Use ElastiCache in front of your Amazon RDS DB to cache common queries.

Answer

A. C. & D.

Amazon RDS Read Replicas provide enhanced performance and durability for database (DB) instances. This replication feature makes it easy to elastically scale out beyond the capacity constraints of a single DB Instance for read-heavy database workloads. You can create one or more replicas of a given source DB Instance and serve high-volume application read traffic from multiple copies of your data, thereby increasing aggregate read throughput. For more information on Read Replicas, please refer to the link below. https://aws.amazon.com/rds/details/read-replicas/ Sharding is a common concept to split data across multiple tables in a database. Let us look at an example. Virtual Shards In this example, we assume our application currently doesn’t have enough load to need a physical shard for each category, but we want to plan ahead with growth in mind. To make future growth easier we make use ofvirtual shards. So our application code will act as if it has seven shards, but Hibernate will map those seven shards onto a smaller number of physical shards. Each physical shard will map to a MySQL database instance. By using this mapping we can distribute the load to best suit our needs. For our application assume that sports and entertainment generate as much load as the other five categories combined. These two categories will map to one physical shard and the other five categories will map to the other physical shard. The two physical shards will be mapped as follows. For more information on sharding, please refer to the link below. https://forums.aws.amazon.com/thread.jspa?messageID=203052 Amazon ElastiCache is a web service that makes it easy to deploy, operate, and scale an in-memory data store or cache inthe cloud. The service improves the performance of web applications by allowing you to retrieve information from fast, managed, in-memory data stores, instead of relying entirely on slower disk-based databases. For more information on ElastiCache, please refer to the link below. https://aws.amazon.com/elasticache/ Option B is not an ideal way to scale a database. Option C is not an ideal choice to store data going into a database because of the message size. Option F is invalid because the Multi-AZ feature is only a failover option.


10. You have an AWS RDS PostgreSQL database hosted in the Singapore region. You need to ensure that a backup database is in place and the data is asynchronously copied. Which of the following would help fulfill this requirement?

A. Enable Multi-AZ for the database

B. Enable Read Replicas for the database

C. Enable Asynchronous replication for the database

D. Enable manual backups for the database

Answer

B. Enable Read Replicas for the database

AWS Documentation mentions the following: Amazon RDS Read Replicas enable you to create one or more read-only copies of your database instance within the same AWS Region or in a different AWS Region. Updates made to the source database are then asynchronously copied to your Read Replicas. In addition to providing scalability for read-heavy workloads, Read Replicas can be promoted to become a standalone database instance when needed. For more information on Read Replicas, please visit the following URL: https://aws.amazon.com/rds/details/read-replicas/ Note: When you enable Multi-AZ for the database then we are enabling synchronous replication rather than asynchronous replication mentioned in the question.When you create a Read Replica, you first specify an existing DB instance as the source. Then Amazon RDS takes a snapshot of the source instance and creates a read-only instance from the snapshot. Amazon RDS then uses the asynchronous replication method for the DB engine to update the Read Replica whenever there is a change to the source DB instance. You can use Read Replica promotion as a data recovery scheme if the source DB instance fails.For more information please click the link given below:https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html


11. Your organization is building a collaboration platform for which they chose AWS EC2 for web and application servers and MySQL RDS instance as the database. Due to the nature of the traffic to the application, they would like to increase the number of connections to RDS instance. How can this be achieved?

A. Login to RDS instance and modify database config file under /etc/mysql/my.cnf

B. Create a new parameter group, attach it to DB instance and change the setting.

C. Create a new option group, attach it to DB instance and change the setting.

D. Modify setting in default options group attached to DB instance.

Answer

B. Create a new parameter group, attach it to DB instance and change the setting.

You manage your DB engine configuration through the use of parameters in a DB parameter group . DB parameter groups act as a container for engine configuration values that are applied to one or more DB instances.A default DB parameter group is created if you create a DB instance without specifying a customer-created DB parameter group. Each default DB parameter group contains database engine defaults and Amazon RDS system defaults based on the engine, compute class, and allocated storage of the instance. You cannot modify the parameter settings of a default DB parameter group; you must create your own DB parameter group to change parameter settings from their default value. Note that not all DB engine parameters can be changed in a customer-created DB parameter group.If you want to use your own DB parameter group, you simply create a new DB parameter group, modify the desired parameters, and modify your DB instance to use the new DB parameter group. All DB instances that are associated with a particular DB parameter group get all parameter updates to that DB parameter group.For more information;https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.