Exam SAA-C03 All QuestionsBrowse all questions from this exam
Question 87

A company hosts an application on AWS Lambda functions that are invoked by an Amazon API Gateway API. The Lambda functions save customer data to an Amazon Aurora MySQL database. Whenever the company upgrades the database, the Lambda functions fail to establish database connections until the upgrade is complete. The result is that customer data is not recorded for some of the event.

A solutions architect needs to design a solution that stores customer data that is created during database upgrades.

Which solution will meet these requirements?

    Correct Answer: D

    The best solution to ensure that customer data is not lost during database upgrades is to store the customer data in an Amazon Simple Queue Service (Amazon SQS) FIFO queue. SQS will act as a buffer, holding the data temporarily until it can be written to the database. A new Lambda function can then be created to poll the queue and store the customer data in the database once the upgrade is complete. This guarantees that no data will be lost due to the database being unavailable during the upgrade process, providing a reliable and asynchronous approach to handle such scenarios.

Discussion
brushekOption: A

https://aws.amazon.com/rds/proxy/ RDS Proxy minimizes application disruption from outages affecting the availability of your database by automatically connecting to a new database instance while preserving application connections. When failovers occur, RDS Proxy routes requests directly to the new database instance. This reduces failover times for Aurora and RDS databases by up to 66%.

attila9778

Aurora supports RDS proxy! https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html

PassNow1234

This is MySQL Database. RDS proxy = no no

Robrobtutu

It literally says RDS Proxy is available for Aurora MySQL on the link in the comment you're replying to.

pentium75

But still RDS proxy won't help because during upgrades there is no database that it could proxy to.

SaurabhTiwari1

The original question was about handling a situation where the database is unavailable due to an upgrade, not a failover situation. During a database upgrade, the database instance is not available, and RDS Proxy would not be able to connect to a new database instance because there isn’t one. In this specific scenario, using Amazon SQS as described in option D provides a buffer for the incoming data during the period when the database is unavailable. This ensures that no data is lost, and it can be written to the database once the upgrade is complete.

lofzee

so many upvotes for an incorrect answer. the question doesnt mention having more than one DB so how does RDS proxy help here?

123jhl0Option: D

The answer is D. RDS Proxy doesn't support Aurora DBs. See limitations at: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html

tinyfoot

Actually RDS Proxy supports Aurora DBs running on PostgreSQL and MySQL. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.Aurora_Fea_Regions_DB-eng.Feature.RDS_Proxy.html With RDS proxy, you only expose a single endpoint for request to hit and any failure of the primary DB in a Multi-AZ configuration is will be managed automatically by RDS Proxy to point to the new primary DB. Hence RDS proxy is the most efficient way of solving the issue as additional code change is required. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.howitworks.html

Duke_YU

The question doesn't say the RDS is deployed in a Mutli-AZ mode. which means RDS is not accessible during upgrade anyway. RDS proxy couldn't resolve the DB HA issue. The question is looking for a solution to store the data during DB upgrade. I don't know RDS proxy very well, but the RDS proxy introduction doesn't mention it has the capability of storing data. So, answer A couldn't store the data created during the DB upgrade. I'm assuming this is a bad question design. The expected answer is A, but the question designer missed some important information.

rismail

https://aws.amazon.com/rds/proxy/, if you go down the page, you will see that RDS is deployed in Multi-AZ (mazon RDS Proxy is highly available and deployed over multiple Availability Zones (AZs) to protect you from infrastructure failure. Each AZ runs on its own physically distinct, independent infrastructure and is engineered to be highly reliable. In the unlikely event of an infrastructure failure, the RDS Proxy endpoint remains online and consistent allowing your application to continue to run database operations.) from the link.

gcmrjbr

You can use RDS Proxy with Aurora Serverless v2 clusters but not with Aurora Serverless v1 clusters. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html

JayBee65

It does, according to that link

adeyinkaamole

This not RDS supports Aurora mysl database. All the limitations listed in the link you posted above are not related to the question, hence the answer is B

adeyinkaamole

I meant the answer answer is A

DuckydooOption: D

My reasoning for selecting D and not A is because while RDS proxy can decouple the lambda->proxy and proxy-db connections, it cannot hold that beyond the lifetime of the lambda. If the DB upgrade lasts more than say 15 mins, the lambda will timeout and the data will be lost forever. The only way to be sure is to use an SQS queue with a retention time that is reasonably longer than the upgrade time, so if the lambda times out, the data will remain in the queue until it is successfully inserted into the DB later and then removed from the queue.

Pr1estOption: A

RDS proxy can improve application availability in such a situation by waiting for the new database instance to be functional and maintaining any requests received from the application during this time. The end result is that the application is more resilient to issues with the underlying database. This will enable solution to hold data till the time DB comes back to normal.

awsgeek75Option: D

I originally voted A but now I believe it's D RDS Proxy needs something to pool connection against. If the Aurora DB is down the connection pools will not help as they are not connected to anything. SQS FIFO queue will act as a "queue" to store the data until the DB is back up. Having said all of that I think some critical context is missing from this question which is why there is so much confusion between A/D. Hopefully exam question will have more info.

soufiyaneOption: D

d is the answer

UzbekistanOption: D

Amazon SQS FIFO Queue: Amazon SQS FIFO (First-In-First-Out) queues provide exactly-once processing, ensuring that messages are processed in the order they are received and are not duplicated. This ensures the reliability of message delivery, crucial for preserving customer data. Lambda Function to Process Queue: Create a new Lambda function that regularly polls the SQS FIFO queue for messages containing customer data. Lambda can be configured to trigger based on a schedule or on demand. This function will retrieve messages from the queue and process them, storing the customer data in the database.

Ikki77Option: D

This option introduces a decoupling mechanism using SQS, allowing the Lambda functions to push customer data to a queue during database upgrades. Another Lambda function can then process the queue and store the customer data in the database. This helps to ensure that customer data is not lost during database upgrades, providing a reliable and asynchronous approach to handle such scenarios.

CharumathiOption: D

D is the correct answer, For failover we can use RDS proxy, here the database is upgrade, so there should be a SQS to store the customer data during upgrade, hence we go for option D. https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html

ChinthaGurumurthiOption: D

By using Amazon RDS Proxy, you can allow your applications to pool and share database connections to improve their ability to scale. RDS Proxy makes applications more resilient to database failures by automatically connecting to a standby DB instance while preserving application connections. Using RDS Proxy, you can handle unpredictable surges in database traffic. Otherwise, these surges might cause issues due to oversubscribing connections or new connections being created at a fast rate.

jaradat02Option: D

D is the correct answer because it offers storage for the data while the database is updating, using SQS is better than using RDS proxy, because SQS is an independent service and it decouples the system, while RDS proxy might also face some trouble connecting to the database while it's updating.

ad11934

Originally I felt option A is correct but looks like D is correct since even though rds proxy can support aurora db and minor db upgrades, the question mentions the db upgrades which could be major or minor in which case rds proxy may not be right.

CloudLearner01

RDS proxy is correct Many applications, including those built on modern serverless architectures, can have a large number of open connections to the database server and may open and close database connections at a high rate, exhausting database memory and compute resources. Amazon RDS Proxy allows applications to pool and share connections established with the database, improving database efficiency and application scalability. With RDS Proxy, failover times for Aurora and RDS databases are reduced by up to 66% and database credentials, authentication, and access can be managed through integration with AWS Secrets Manager and AWS Identity and Access Management (IAM).

mehmehmeh

What EVERYONE is failing to remember is that when a database is doing an upgrade that ALL instances of the database are offline, whether multi-AZ or read replicas or whatever...these are not 'open' connections, they are failed connections. Where, exactly, would RDS Proxy be proxying to?

thewalkerOption: A

Option to have RDS Proxy is available, then why to go other routes ?

thewalker

From Amazon Q: RDS Proxy can be used with Amazon Aurora. Here are some key points about using RDS Proxy with Aurora: RDS Proxy supports connecting to Aurora MySQL and Aurora PostgreSQL databases. This allows applications to connect to Aurora clusters via the proxy. Using a proxy provides better scalability by allowing connections to be distributed among Aurora replica instances. It also improves availability since the proxy can direct connections to other Aurora replicas if the primary becomes unavailable. The Aurora database and RDS Proxy must be in the same VPC to allow connections. Your applications can be deployed in the same VPC or a different one, as long as they have network access to the proxy. Certain regions and Aurora engine versions support RDS Proxy based on the database engine. You can check the AWS documentation for the latest supported versions in each region.

thewalker

The database and proxy need appropriate security group rules and IAM permissions configured to allow connections. The RDS Proxy also requires a secret with database credentials stored in Secrets Manager. You would connect applications to the proxy endpoint rather than directly connecting to the Aurora endpoint. This allows the proxy to handle and load balance connections to the Aurora replicas. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.Aurora_Fea_Regions_DB-eng.Feature.RDS_Proxy.html https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy-setup.html

awsgeek75Option: A

I originally would have gone with D but given this is AWS, I would focus on native AWS product based solution as sold by the "marketing" team. "A" will use RDS proxy which is a product suitable for Database failures or unavailability during upgrades. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.howitworks.html#rds-proxy-failover

awsgeek75

Ignore my answer, it has to be D.

cheroh_tots

Given the requirement to ensure customer data is not lost during database upgrades when Lambda functions fail to establish connections, the most appropriate solution is to decouple the Lambda functions from the database using a queueing mechanism. This way, the customer data can be temporarily stored and processed independently of the database availability. Option D, which suggests storing customer data in an Amazon SQS FIFO queue and creating a new Lambda function to poll the queue and store the data in the database, aligns with this requirement and is the recommended solution.

kel2023Option: D

AWS API Gateway has 29 seconds timeout. Please let me know who can finish database upgrade (and database backup prior upgrade) within 29 seconds then I will vote for A?

DHADD003Option: A

`It's not D and here is why. As soon as the lambda function fails while using FIFO it will lose the the record it processed but didn't not save to the database. There is no retry with Lambda. Yes, FIFO will stop from sending further message but you will lose the last record that was sent to the Lambda function. D would be correct if a Dead Letter Queue was added as well.

pentium75

D is correct. If the Lambda function fails, it does not remove the message from the queue, thus it will be picked up again. A is nonsense because during database upgrades, there is no available database. RDS proxy helps to fail over, but there is nothing that you could fail over to.