What is the MOST cost-effective migration recommendation?
Create a queue using Amazon SQS. Configure the existing web server to publish to the new queue. When there are messages in the queue, invoke an AWS Lambda function to pull requests from the queue and process the files. Store the processed files in an Amazon S3 bucket.
Create a queue using Amazon MQ. Configure the existing web server to publish to the new queue. When there are messages in the queue, create a new Amazon EC2 instance to pull requests from the queue and process the files. Store the processed files in Amazon EFS. Shut down the EC2 instance after the task is complete.
Create a queue using Amazon MQ. Configure the existing web server to publish to the new queue. When there are messages in the queue, invoke an AWS Lambda function to pull requests from the queue and process the files. Store the processed files in Amazon EFS.
Create a queue using Amazon SQS. Configure the existing web server to publish to the new queue. Use Amazon EC2 instances in an EC2 Auto Scaling group to pull requests from the queue and process the files. Scale the EC2 instances based on the SQS queue length. Store the processed files in an Amazon S3 bucket.
Explanations:
While using Amazon SQS and AWS Lambda is cost-effective for many use cases, processing files that take up to an hour each with Lambda can lead to increased costs due to the duration of execution. AWS Lambda has a maximum timeout of 15 minutes, so this option would not work for processing each media file.
Using Amazon MQ with EC2 instances involves higher costs due to the need to maintain EC2 instances, even if they are shut down after processing. Additionally, storing processed files in Amazon EFS can be more expensive than storing them in Amazon S3, making this option less cost-effective.
Similar to option B, while Amazon MQ is viable, using AWS Lambda for processing files that can take up to an hour exceeds Lambda’s execution limit. Storing files in Amazon EFS can also lead to higher costs compared to Amazon S3.
This option utilizes Amazon SQS with EC2 Auto Scaling, allowing the number of instances to scale up based on demand, which is cost-effective during peak hours. Storing processed files in Amazon S3 is also more economical than using Amazon EFS. This approach allows for efficient processing of files that take longer to handle and optimizes costs during varying workloads.