AWS Certified Solutions Architect – Professional — Question 703
A company has an application. Once a month, the application creates a compressed file that contains every object within an Amazon S3 bucket. The total size of the objects before compression is 1 TB.
The application runs by using a scheduled cron job on an Amazon EC2 instance that has a 5 TB Amazon Elastic Block Store (Amazon EBS) volume attached. The application downloads all the files from the source S3 bucket to the EBS volume, compresses the file, and uploads the file to a target S3 bucket. Every invocation of the application takes 2 hours from start to finish.
Which combination of actions should a solutions architect take to OPTIMIZE costs for this application? (Choose two.)
Answer options
- A. Migrate the application to run an AWS Lambda function. Use Amazon EventBridge (Amazon CloudWatch Events) to schedule the Lambda function to run once each month.
- B. Configure the application to download the source files by using streams. Direct the streams into a compression library. Direct the output of the compression library into a target object in Amazon S3.
- C. Configure the application to download the source files from Amazon S3 and save the files to local storage. Compress the files and upload them to Amazon S3.
- D. Configure the application to run as a container in AWS Fargate. Use Amazon EventBridge (Amazon CloudWatch Events) to schedule the task to run once each month.
- E. Provision an Amazon Elastic File System (Amazon EFS) file system. Attach the file system to the AWS Lambda function.
Correct answer: B, D
Explanation
AWS Fargate is the ideal compute choice for this scenario because it allows running a containerized task on a monthly schedule without paying for an idle EC2 instance, while bypassing AWS Lambda's 15-minute execution limit. Additionally, streaming the files directly to a compression library and uploading them straight to Amazon S3 eliminates the need to allocate and pay for a massive 5 TB EBS volume. AWS Lambda is unsuitable because the application takes 2 hours to complete, which exceeds Lambda's maximum timeout.