Question #800
A company is developing a serverless application where independent components must communicate asynchronously to maintain loose coupling. Which AWS service best fulfills this requirement?
AWS Lambda
Amazon API Gateway
Amazon Simple Queue Service (Amazon SQS)
Amazon EC2 Auto Scaling
Explanation
Amazon Simple Queue Service (SQS) is designed for asynchronous communication between distributed components. It decouples producers and consumers by storing messages in a queue, ensuring reliable delivery without requiring components to be available simultaneously. This supports loose coupling in serverless architectures.
Why other options are incorrect:
- A. AWS Lambda: Executes code in response to events but does not facilitate communication between components.
- B. Amazon API Gateway: Manages synchronous HTTP-based APIs, not asynchronous messaging.
- D. Amazon EC2 Auto Scaling: Handles scaling of EC2 instances, unrelated to component communication.
Key Points:
- Asynchronous communication requires a messaging service like SQS.
- Loose coupling minimizes dependencies between components.
- SQS integrates seamlessly with serverless services like Lambda.
Answer
The correct answer is: C