Medium1 markMultiple Choice
Domain 2.4: ReliabilitySQSArchitectureReliability

AWS SAP-C02 · Question 52 · Domain 2.4: Reliability

An architect is designing a data ingestion pipeline. Data is sent to an API Gateway, which triggers a Lambda function. The Lambda function writes the data to an RDS database. During traffic spikes, the RDS database becomes overwhelmed and drops connections. How can the architect decouple the architecture to prevent database overload?

Answer options:

A.

Increase the size of the RDS instance.

B.

Introduce an Amazon SQS queue between the API Gateway and the Lambda function.

C.

Use Amazon ElastiCache in front of the RDS database.

D.

Configure API Gateway to write directly to RDS.

How to approach this question

Use a queue to buffer writes and decouple components.

Full Answer

B.Introduce an Amazon SQS queue between the API Gateway and the Lambda function.✓ Correct
Introduce an Amazon SQS queue between the API Gateway and the Lambda function.
Using Amazon SQS as a buffer decouples the ingestion rate from the processing rate. You can limit the Lambda concurrency to ensure the RDS database is only written to at a rate it can handle.

Common mistakes

Trying to scale the database instead of fixing the architectural coupling.

Practice the full AWS Solutions Architect Professional SAP-C02 Practice Exam 2

75 questions · hints · full answers · grading

More questions from this exam