Topic 1 Question 212
A company runs a microservice as an AWS Lambda function. The microservice writes data to an on-premises SQL database that supports a limited number of concurrent connections. When the number of Lambda function invocations is too high, the database crashes and causes application downtime. The company has an AWS Direct Connect connection between the company's VPC and the on-premises data center. The company wants to protect the database from crashes.
Which solution will meet these requirements?
Write the data to an Amazon Simple Queue Service (Amazon SQS) queue. Configure the Lambda function to read from the queue and write to the existing database. Set a reserved concurrency limit on the Lambda function that is less than the number of connections that the database supports.
Create a new Amazon Aurora Serverless DB cluster. Use AWS DataSync to migrate the data from the existing database to Aurora Serverless. Reconfigure the Lambda function to write to Aurora.
Create an Amazon RDS Proxy DB instance. Attach the RDS Proxy DB instance to the Amazon RDS DB instance. Reconfigure the Lambda function to write to the RDS Proxy DB instance.
Write the data to an Amazon Simple Notification Service (Amazon SNS) topic. Invoke the Lambda function to write to the existing database when the topic receives new messages. Configure provisioned concurrency for the Lambda function to be equal to the number of connections that the database supports.
ユーザの投票
コメント(14)
- 正解だと思う選択肢: A
A tricky question :) The RDS proxy sounds sexy, but it cannot be used because the database is on premise.
The creative solution here is SQS. Such questions are partly about your understanding of the services and some solutions are good, even if they sound a bit strange at first :)
👍 4Just_Ninja2023/07/20 - 正解だと思う選択肢: A
"The company wants to protect the database from crashes" means keep the existing one and do something that can prevent crashes, not to migrate it to another in anywhere. -> B, C out
Choice between SQS and SNS is easy.
👍 4joleneinthebackyard2023/10/31 - 正解だと思う選択肢: A
apparently, we need to make the lambda "not to rush that much" and keep the connection within the limit of the on-pre DB. So if we want not to lose data while waiting we implement SQS before the lambda so it keeps the requests in the queue.
👍 3Maria20232023/06/24
シャッフルモード