Which of the following is the MOST reliable approach to meet the requirements?
Receive the orders in an Amazon EC2-hosted database and use EC2 instances to process them.
Receive the orders in an Amazon SQS queue and trigger an AWS Lambda function to process them.
Receive the orders using the AWS Step Functions program and trigger an Amazon ECS container to process them.
Receive the orders in Amazon Kinesis Data Streams and use Amazon EC2 instances to process them.
Explanations:
Hosting the application on EC2 instances would introduce single points of failure, complicate scaling during high traffic, and lack the loose coupling that modern applications benefit from. EC2 also requires manual management of infrastructure, which is not ideal for a sporadic traffic pattern.
Using Amazon SQS provides a reliable and scalable way to decouple the order processing. Orders are received in the SQS queue, allowing for asynchronous processing. AWS Lambda can scale automatically to handle variable workloads, ensuring minimal delays during high traffic. This architecture is highly available and loosely coupled.
While AWS Step Functions can manage complex workflows, it may introduce unnecessary complexity for a simple order processing application. Triggering Amazon ECS containers can also involve more overhead in terms of management and scaling compared to Lambda, making it less optimal for sporadic traffic.
Amazon Kinesis Data Streams is more suited for real-time data processing and analytics rather than simple order processing. Using EC2 instances to process data from Kinesis would still lead to a tightly coupled architecture and manual scaling challenges, reducing overall reliability for sporadic traffic patterns.