Which solution will meet these requirements MOST cost-effectively?
Run the program by using Amazon EC2 On-Demand Instances. Create an Amazon EventBridge rule to start the EC2 instances when reports are requested. Run the EC2 instances continuously during the last week of each month.
Run the program in AWS Lambda. Create an Amazon EventBridge rule to run a Lambda function when reports are requested.
Run the program in Amazon Elastic Container Service (Amazon ECS). Schedule Amazon ECS to run the program when reports are requested.
Run the program by using Amazon EC2 Spot Instances. Create an Amazon EventBndge rule to start the EC2 instances when reports are requested. Run the EC2 instances continuously during the last week of each month.
Explanations:
Using On-Demand Instances incurs higher costs due to continuous running, especially since reports are only needed during the last week of each month. This is not cost-effective for infrequent usage.
AWS Lambda is a serverless solution that charges based on execution time, making it highly cost-effective for generating reports on demand. It allows for quick report generation without the need to maintain infrastructure.
While Amazon ECS can run the program, it requires managing container instances, which adds unnecessary complexity and cost for infrequent usage, especially since the program only runs when reports are requested.
Using Spot Instances can reduce costs but requires managing instances continuously during the last week, which is unnecessary since the reports are only generated upon request. This option doesn’t align with the need for immediate report generation.