Which architecture solution meets these requirements?
Use AWS Batch to configure the different tasks required to ship a package. Have AWS Batch trigger an AWS Lambda function that creates and prints a shipping label. Once that label is scanned, as it leaves the warehouse, have another Lambda function move the process to the next step in the AWS Batch job.
When a new order is created, store the order information in Amazon SQS. Have AWS Lambda check the queue every 5 minutes and process any needed work. When an order needs to be shipped, have Lambda print the label in the warehouse. Once the label has been scanned, as it leaves the warehouse, have an Amazon EC2 instance update Amazon SQS.
Update the application to store new order information in Amazon DynamoDB. When a new order is created, trigger an AWS Step Functions workflow, mark the orders as ג€in progressג€, and print a package label to the warehouse. Once the label has been scanned and fulfilled, the application will trigger an AWS Lambda function that will mark the order as shipped and complete the workflow.
Store new order information in Amazon EFS. Have instances pull the new information from the NFS and send that information to printers in the warehouse. Once the label has been scanned, as it leaves the warehouse, have Amazon API Gateway call the instances to remove the order information from Amazon EFS.
Explanations:
AWS Batch is not the right choice for real-time task management in this scenario. AWS Lambda can handle triggers, but using AWS Batch complicates the workflow unnecessarily for a simple order processing application. Moreover, AWS Batch is designed for batch processing, which doesn’t align with the need for immediate shipping updates.
While using Amazon SQS for order management is a viable option, polling the queue every 5 minutes is not efficient or real-time. It introduces latency and can lead to delays in processing orders. Additionally, relying on an EC2 instance to update SQS after scanning a label adds complexity and does not leverage a fully serverless architecture effectively.
This option utilizes Amazon DynamoDB to store orders, which provides quick access and scalability. Triggering an AWS Step Functions workflow allows for orchestration of the order processing steps, marking orders as “in progress,” and managing the state efficiently. This workflow supports real-time updates and serverless architecture. AWS Lambda is used to mark the order as shipped after scanning the label, making this a suitable solution.
Storing order information in Amazon EFS requires managing EC2 instances, which does not align with a serverless model. The need to pull information from an NFS and rely on API Gateway to communicate with instances adds unnecessary complexity and does not provide the real-time processing capabilities needed for shipment tracking.