AWS Certified Solutions Architect Professional SAP-C02 Practice Question

Your company recently completed a lift-and-shift migration of its on-premises order-processing system to AWS. A Python script is triggered every hour by cron on an Amazon EC2 instance in the OrderService Auto Scaling group. The script connects read-only to an existing Amazon RDS for MySQL database, aggregates the last hour of orders, writes a CSV file, and uploads the file to an Amazon S3 bucket. Because of the cron schedule, at least one EC2 instance must remain running even though the aggregation takes only a few minutes per hour.

Management asks a solutions architect to modernize this reporting workflow. The replacement solution must:

  • Eliminate the need to keep EC2 instances running solely for the hourly job.
  • Require only minimal changes to the existing Python logic.
  • Continue writing the CSV report to the same S3 bucket.
  • Provide built-in retry capability and error logging without provisioning servers or containers.

Which approach meets these requirements MOST cost-effectively while aligning with a serverless design strategy?

  • Define an AWS Batch job that runs the Python script and associate it with a managed compute environment using Amazon EC2 On-Demand instances. Schedule the job submission with an EventBridge rule that runs hourly.

  • Configure an Amazon EventBridge Scheduler rule to invoke an AWS Lambda function each hour. Package the existing Python script as the Lambda handler, connect to the RDS database (optionally through RDS Proxy), generate the CSV in memory, and upload it to the S3 bucket.

  • Create an AWS Glue Spark ETL job triggered hourly by an AWS Glue workflow. Use a JDBC connection to read order data from RDS and write the results as Parquet files to S3.

  • Containerize the Python script into an Amazon ECS task that runs on AWS Fargate. Use an EventBridge rule to start the task every hour and stop it when the task finishes.

AWS Certified Solutions Architect Professional SAP-C02
Accelerate Workload Migration and Modernization
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot