nerdexam
Amazon

SAP-C02 · Question #283

A company runs a Python script on an Amazon EC2 instance to process data. The script runs every 10 minutes. The script ingests files from an Amazon S3 bucket and processes the files. On average, the…

The correct answer is A. Migrate the data processing script to an AWS Lambda function. Use an S3 event notification to. migrating the data processing script to an AWS Lambda function and using an S3 event notification to invoke the Lambda function to process the objects when the company uploads the objects. This solution meets the company's requirements of high availability and scalability, as…

Submitted by takeshi77· Mar 6, 2026Migrate Workloads and Modernize Solutions

Question

A company runs a Python script on an Amazon EC2 instance to process data. The script runs every 10 minutes. The script ingests files from an Amazon S3 bucket and processes the files. On average, the script takes approximately 5 minutes to process each file. The script will not reprocess a file that the script has already processed. The company reviewed Amazon CloudWatch metrics and noticed that the EC2 instance is idle for approximately 40% of the time because of the file processing speed. The company wants to make the workload highly available and scalable. The company also wants to reduce long-term management overhead. Which solution will meet these requirements MOST cost-effectively?

Options

  • AMigrate the data processing script to an AWS Lambda function. Use an S3 event notification to
  • BCreate an Amazon Simple Queue Service (Amazon SQS) queue. Configure Amazon S3 to send
  • CMigrate the data processing script to a container image. Run the data processing container on an
  • DMigrate the data processing script to a container image that runs on Amazon Elastic Container

How the community answered

(23 responses)
  • A
    74% (17)
  • B
    4% (1)
  • C
    9% (2)
  • D
    13% (3)

Explanation

migrating the data processing script to an AWS Lambda function and using an S3 event notification to invoke the Lambda function to process the objects when the company uploads the objects. This solution meets the company's requirements of high availability and scalability, as well as reducing long-term management overhead, and is likely to be the most cost-effective

Community Discussion

No community discussion yet for this question.

Full SAP-C02 Practice