Medium1 markMultiple Choice
Domain 4.4: Modernization RequirementsMicroservicesSNSSQSArchitecture Patterns

AWS SAP-C02 · Question 75 · Domain 4.4: Modernization Requirements

A company is modernizing a monolithic application into microservices. They have chosen Amazon ECS on AWS Fargate. The microservices need to communicate with each other asynchronously. Service A generates events that need to be processed by Service B and Service C. Service B must process every event, but Service C only needs to process events where the 'status' field is 'critical'. Which architecture is MOST decoupled and cost-effective?

Answer options:

A.

Service A sends messages directly to Service B and Service C using HTTP APIs.

B.

Service A sends messages to a single Amazon SQS queue. Both Service B and Service C poll the queue.

C.

Service A publishes to an Amazon SNS topic. Service B and Service C have their own SQS queues subscribed to the topic. Service C's subscription uses a filter policy.

D.

Service A writes events to an Amazon RDS database. Service B and Service C poll the database.

How to approach this question

Identify the SNS to SQS fan-out pattern with message filtering.

Full Answer

C.Service A publishes to an Amazon SNS topic. Service B and Service C have their own SQS queues subscribed to the topic. Service C's subscription uses a filter policy.✓ Correct
The SNS to SQS fan-out pattern is the standard for asynchronous microservice communication. Service A publishes once to SNS. SNS pushes to the SQS queues of Service B and C. Applying an SNS filter policy for Service C ensures it only receives relevant messages, reducing unnecessary processing.

Common mistakes

Having multiple services poll the same SQS queue.

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

75 questions · hints · full answers · grading

More questions from this exam