DEV Community

Cover image for AWS Cloud Practitioner Questions | RDS, Aurora, & ElastiCache
Minoltan Issack
Minoltan Issack

Posted on • Originally published at issackpaul95.Medium

AWS Cloud Practitioner Questions | RDS, Aurora, & ElastiCache

Question 1:

Amazon RDS supports the following databases, EXCEPT:

Answer (1): Amazon RDS does not support MongoDB. Instead, RDS supports other databases such as MySQL, MariaDB, and Microsoft SQL Server. This helps you understand which databases are compatible with Amazon RDS and clarifies that MongoDB is not included in this managed service.


Question 2:

You're planning for a new solution that requires a MySQL database that must be available even in case of a disaster in one of the Availability Zones. What should you use?

Answer: (3) Multi-AZ deployments in Amazon RDS automatically create a synchronous standby replica of your database in a different Availability Zone. This setup provides high availability and durability, ensuring that if one AZ experiences a failure or disaster, the database remains available in the other AZ without manual intervention. In contrast, Read Replicas are mainly used for scaling read operations rather than disaster recovery, as they are asynchronous and may not provide immediate failover support in case of an AZ failure. Enabling Multi-AZ is the recommended approach for disaster recovery within a single region to ensure continuous availability.


Question 3:

We have an RDS database that struggles to keep up with the demand of requests from our website. Our million users mostly read news, and we don't post news very often. Which solution is NOT adapted to this problem?

Answer: (2) "RDS Multi-AZ" provides high availability and automatic failover in case of an Availability Zone failure. It ensures durability but does not improve read performance. "Read Replicas" are designed for scaling read operations, not for disaster recovery. "ElastiCache" improves read speed by caching data, not by providing database failover. Therefore, Multi-AZ is correct for high availability, while the others focus on scaling and caching.


Question 4:

You have set up read replicas on your RDS database, but users are complaining that upon updating their social media posts, they do not see their updated posts right away. What is a possible cause for this?

Answer (2) : Read Replicas use asynchronous replication, which can cause delays, leading to eventual consistency, so users might not see their updates immediately. Multi-AZ provides high availability and automatic failover but doesn't improve read scalability. ElastiCache speeds up read access by caching data but does not handle database replication or failover. Therefore, for ensuring data consistency, Read Replicas' asynchronous nature makes them less immediate. The other options serve different purposes like high availability or caching.


Question 5:

Which RDS (NOT Aurora) feature when used does not require you to change the SQL connection string?

Answer (1): Multi-AZ maintains the same connection string because it automatically handles failover to the standby replica without requiring connection string changes. In contrast, Read Replicas have their own endpoints and DNS names, so applications need to be updated to connect to them directly. Multi-AZ provides high availability but not read scaling. Read Replicas support read scalability but require configuration changes in the application. Therefore, Multi-AZ does not require changes to the connection string.


Question 6:

Your application running on a fleet of EC2 instances managed by an Auto Scaling Group behind an Application Load Balancer. Users have to constantly log back in and you don't want to enable Sticky Sessions on your ALB as you fear it will overload some EC2 instances. What should you do?

Answer (3): Storing session data in ElastiCache allows multiple EC2 instances to access user sessions quickly and efficiently, supporting stateless application design. RDS could store session data but offers lower performance compared to ElastiCache, which is optimized for fast access. Using your own load balancer doesn't address session management and can lead to complexity. EBS volumes are not suitable for shared session storage across instances due to limitations and performance concerns. Therefore, ElastiCache is the best choice for managing user sessions without sticky sessions.


Question 7:

An analytics application is currently performing its queries against your main production RDS database. These queries run at any time of the day and slow down the RDS database which impacts your users' experience. What should you do to improve the users' experience?

Answer (1): Setting up a Read Replica allows analytics queries to run independently, so they won't slow down the main database. Multi-AZ is mainly for high availability and automatic failover, not for offloading read workloads. Running queries at night limits real-time performance and doesn't address ongoing query impacts during the day. Read Replicas improve performance by distributing read traffic, making the user experience better. The other options do not effectively handle the problem of heavy, ongoing query load.


Question 8:

You would like to ensure you have a replica of your database available in another AWS Region if a disaster happens to your main AWS Region. Which database do you recommend to implement this easily?

Answer (4): Aurora Global Database is designed for disaster recovery across regions by allowing replicas in multiple AWS regions. RDS Read Replicas are limited to the same region and don't support cross-region disaster recovery. RDS Multi-AZ is for high availability within a single region and does not provide cross-region replication. Aurora Read Replicas are regional but do not have the global multi-region capability. Aurora Global Database is the best option for multi-region disaster recovery.


Question 9:

How can you enhance the security of your ElastiCache Redis Cluster by allowing users to access your ElastiCache Redis Cluster using their IAM Identities (e.g., Users, Roles)?

Answer (2): Using IAM Authentication allows users to securely access ElastiCache Redis with their IAM identities, enabling fine-grained access control and auditability. Redis Authentication relies on a password, which is less integrated with AWS identity management. Security Groups control network traffic but do not handle user authentication directly. IAM Authentication is specifically designed for integrating AWS user identities with ElastiCache for better security. The other options do not provide direct IAM-based user access control.


Question 10:

Your company has a production Node.js application that is using RDS MySQL 5.6 as its database. A new application programmed in Java will perform some heavy analytics workload to create a dashboard on a regular hourly basis. What is the most cost-effective solution you can implement to minimize disruption for the main application?

Answer (2): Creating a Read Replica in a different AZ allows the analytics workload to run without affecting the main database's performance. This minimizes disruption for the primary application while handling heavy analytics separately. Enabling Multi-AZ only provides high availability and automatic failover, not workload separation. Running analytics on the source database could slow down the main application and cause performance issues. Using a cross-AZ Read Replica is the most cost-effective and suitable solution for this scenario.


Question 11:

You would like to create a disaster recovery strategy for your RDS PostgreSQL database so that in case of a regional outage the database can be quickly made available for both read and write workloads in another AWS Region. The DR database must be highly available. What do you recommend?

Answer (2): Creating a read replica in a different region provides a backup that can be quickly promoted during a regional outage, ensuring high availability. Enabling Multi-AZ on the main database improves local availability but does not protect against regional failures. Creating a read replica in the same region with Multi-AZ doesn't provide cross-region disaster recovery. The "Enable Multi-Region" option does not exist in RDS; cross-region replication must be set up manually. The correct approach is to create a read replica in the target region for effective disaster recovery.


Question 12:

You have migrated the MySQL database from on-premises to RDS. You have a lot of applications and developers interacting with your database. Each developer has an IAM user in the company's AWS account. What is a suitable approach to give access to developers to the MySQL RDS DB instance instead of creating a DB user for each one?

Answer (3): Enabling IAM Database Authentication allows developers to access the RDS MySQL instance using their IAM credentials, simplifying user management. It eliminates the need to create individual database users and passwords for each developer. By default, IAM users do not have direct access to RDS databases without this feature enabled. Using Amazon Cognito is primarily for user authentication in mobile or web applications, not for direct database access. The correct choice streamlines access control while maintaining security via IAM.


Question 13:

Which of the following statement is true regarding replication in both RDS Read Replicas and Multi-AZ?

Answer (2): Read Replicas use asynchronous replication, which allows data to be copied to the replica with a slight delay, suitable for scaling and offloading read traffic. Multi-AZ deployments use synchronous replication, ensuring data is written to both the primary and standby instances simultaneously for high availability. The other options incorrectly state both use asynchronous or synchronous replication, which is not accurate. Synchronous replication in Multi-AZ provides data consistency during failover. Therefore, the correct answer accurately reflects the different replication methods used.


Question 14:

How do you encrypt an unencrypted RDS DB instance?

Answer (3): The correct method involves creating a snapshot, copying it with encryption enabled, and restoring the instance from this encrypted snapshot, as encryption cannot be directly enabled on an existing unencrypted RDS instance. The first option, encrypting directly from the console without snapshotting, is not possible because RDS does not support on-the-fly encryption of running instances. The second option, stopping the database before snapshotting, is unnecessary; snapshots can be created while the database is running. Restoring from an encrypted snapshot applies encryption to the new instance, which is the correct approach. This process ensures data encryption without downtime or complex configurations.


Question 15:

For your RDS database, you can have up to ............ Read Replicas.

Answer (2): The correct answer is 15, which is the maximum number of Read Replicas allowed for an RDS database, providing scalable read capacity. The choice of 5 is too low and limits scalability unnecessarily. The option of 7 is also below the maximum limit, so it does not represent the highest possible replicas. The limit is set to 15 for most database engines, allowing significant read scaling. Therefore, 15 is the correct maximum number allowed by AWS.


Question 16:

Which RDS database technology does NOT support IAM Database Authentication?

Answer (2): Oracle does not support IAM Database Authentication, so it cannot leverage AWS IAM for database access. PostgreSQL and MySQL, on the other hand, do support IAM authentication, enabling secure, centralized access management through IAM roles. The other options, "PostgreSQL" and "MySQL," support IAM, making them incorrect choices for this question. Oracle's architecture and authentication methods differ, which is why it does not integrate with IAM-based authentication. Therefore, Oracle is the correct answer as it does not support IAM Database Authentication.


Question 17:

You have an un-encrypted RDS DB instance and you want to create Read Replicas. Can you configure the RDS Read Replicas to be encrypted?

Answer (1): You cannot create encrypted Read Replicas from an un-encrypted RDS DB instance because encryption must be enabled at the source instance before replication. AWS does not allow converting or encrypting a Read Replica after it has been created from an unencrypted source. To have an encrypted Read Replica, you must first encrypt the source database through snapshot and restore procedures. This restriction ensures data at rest remains encrypted and secure. Therefore, the correct answer is "No."


Question 18:

An application running in production is using an Aurora Cluster as its database. Your development team would like to run a version of the application in a scaled-down application with the ability to perform some heavy workload on a need-basis. Most of the time, the application will be unused. Your CIO has tasked you with helping the team to achieve this while minimizing costs. What do you suggest?

Answer (3): Aurora Serverless automatically scales capacity up or down based on workload, making it cost-effective for infrequent and variable usage, which matches the team's needs. Using a global database is more suited for multi-region replication and not cost-efficient for small, infrequent workloads. An RDS database or running Aurora on EC2 would require maintaining resources constantly, increasing costs when the app is unused. Shutting down EC2 instances only addresses compute, not the database cost, and is less flexible than Aurora Serverless. Therefore, Aurora Serverless best minimizes costs while handling variable workloads.


Question 19:

How many Aurora Read Replicas can you have in a single Aurora DB Cluster?

Answer (3): Aurora natively supports both MySQL and PostgreSQL, making it compatible with those database engines. Aurora does not support MariaDB, Oracle, or MS SQL Server directly; these are separate from Aurora's supported engines. MariaDB is similar but not officially supported as an Aurora engine. Oracle and MS SQL Server are proprietary databases and are not compatible with Aurora. Therefore, "MySQL and PostgreSQL" is the correct answer, supporting Aurora's capabilities.


Question 20:

Amazon Aurora supports both …………………….. databases.

Answer (2): Aurora supports only MySQL and PostgreSQL engines, making it compatible with both. MariaDB is not supported by Aurora, so you can't use it directly. Oracle and MS SQL Server are proprietary databases with different architectures, so they are not compatible with Aurora. Aurora is designed to work specifically with MySQL and PostgreSQL for seamless integration. Therefore, "MySQL and PostgreSQL" is correct because only these two are supported by Aurora.


Question 21:

You work as a Solutions Architect for a gaming company. One of the games mandates that players are ranked in real-time based on their score. Your boss asked you to design then implement an effective and highly available solution to create a gaming leaderboard. What should you use?

Answer (4): ElastiCache for Redis with Sorted Sets is ideal for real-time ranking because it allows fast, in-memory updates and retrievals of ordered data, making leaderboards highly responsive and available. RDS for MySQL can store data, but it's slower for real-time updates and querying, which is critical for gaming leaderboards. Amazon Aurora provides high availability but isn't optimized for the ultra-low latency and real-time ranking needed here. ElastiCache for Memcached offers fast caching but lacks built-in support for ordered data types like Sorted Sets. Therefore, Redis Sorted Sets are the best fit for creating a highly available, real-time gaming leaderboard.


Question 22:

You need full customization of an Oracle Database on AWS. You would like to benefit from using the AWS services. What do you recommend?

Answer (2): RDS Custom for Oracle provides full customization options on AWS, allowing more control over the database environment, including access to the underlying OS and configurations. RDS for Oracle offers managed service with limited customization, suitable for standardized use cases but not full control. Deploying Oracle on EC2 gives complete customization but requires managing the infrastructure and maintenance yourself, which is less optimized than RDS Custom. RDS Custom strikes a balance by providing control while reducing administrative overhead. Therefore, RDS Custom for Oracle is the best choice for full customization with managed AWS services.


Question 23:

You need to store long-term backups for your Aurora database for disaster recovery and audit purposes. What do you recommend?

Answer (2): Perform On Demand Backups allows you to manually create backups that can be stored for as long as needed for disaster recovery and audits. Automated Backups have a maximum retention period of 35 days, which is insufficient for long-term storage. Aurora Database Cloning creates copies of the database but does not serve as a long-term backup solution. On Demand Backups give you control over backup retention duration beyond the automated retention period. Therefore, performing on-demand backups is best for long-term storage needs.


Question 24:

Your development team would like to perform a suite of read and write tests against your production Aurora database because they need access to production data as soon as possible. What do you advise?

Answer (4): Using Aurora Cloning creates a fast, separate copy of the database for testing without impacting production. Creating a Read Replica allows read-only access but isn't suitable for write testing or immediate data access. Testing directly against the production database risks affecting live users and data integrity. Making a DB Snapshot and restoring it is slower and unnecessary when cloning provides a quicker, safer option. Therefore, Aurora Cloning is the best choice for testing without affecting production performance or data.


Question 25:

You have 100 EC2 instances connected to your RDS database and you see that upon a maintenance of the database, all your applications take a lot of time to reconnect to RDS, due to poor application logic. How do you improve this?

Answer (4): Using RDS Proxy helps manage database connections efficiently, reducing connection time during failovers or maintenance. Fixing all the applications is impractical and time-consuming. Disabling Multi-AZ removes high availability features, risking longer downtime during failover. Enabling Multi-AZ improves availability but doesn't address connection interruptions during maintenance. Therefore, RDS Proxy is best for maintaining persistent connections and minimizing disruption.


To stay informed on the latest technical insights and tutorials, connect with me on Medium, LinkedIn, and Dev.to. For professional inquiries or technical discussions, please contact me via email. I welcome the opportunity to engage with fellow professionals and address any questions you may have. All blogs in this series will be optimized, fine-tuned, developed, and updated in a timely manner to reflect the latest AWS changes, exam updates, and real-world best practices.

Top comments (0)