AWS Certified Solutions Architect – Associate (SAA-C02) — Question 61
A company has a legacy application that processes data in two parts. The second part of the process takes longer than the first, so the company has decided to rewrite the application as two microservices running on Amazon ECS that can scale independently.
How should a solutions architect integrate the microservices?
Answer options
- A. Implement code in microservice 1 to send data to an Amazon S3 bucket. Use S3 event notifications to invoke microservice 2.
- B. Implement code in microservice 1 to publish data to an Amazon SNS topic. Implement code in microservice 2 to subscribe to this topic.
- C. Implement code in microservice 1 to send data to Amazon Kinesis Data Firehose. Implement code in microservice 2 to read from Kinesis Data Firehose.
- D. Implement code in microservice 1 to send data to an Amazon SQS queue. Implement code in microservice 2 to process messages from the queue.
Correct answer: D
Explanation
The correct answer is D because using Amazon SQS allows microservice 1 to send messages to a queue, which microservice 2 can then poll and process independently. This decouples the two microservices, enabling better scalability and reliability. The other options involve mechanisms that are either not suited for independent processing (like S3 event notifications) or do not provide the same level of decoupling and reliability as SQS.