Sample question 1 — ML Implementation and Operations
A data engineer at a retail company runs a nightly AWS Glue ETL job that reads JSON files from an Amazon S3 prefix where new files arrive continuously. The job processes all files in the prefix on every run, causing it to reprocess millions of old records and increase costs. The engineer wants the job to process only files that have arrived since the last successful run without changing the source data. What is the MOST operationally efficient solution?
- A. Enable AWS Glue job bookmarks to track previously processed data and process only new files.
- B. Move processed files to a separate S3 prefix after each run and update the job to read only from the new prefix.
- C. Add a timestamp column to the source files and filter records in the Glue job using a WHERE clause.
- D. Configure the Glue job to read from an Amazon Kinesis stream instead of directly from the S3 prefix.
Answer: A. Option A is correct because AWS Glue job bookmarks persist state between runs and automatically skip data that was already processed, which avoids reprocessing and reduces cost with minimal configuration. Option B is incorrect because moving files requires additional logic and storage operations, and it changes the source layout rather than using built-in state tracking. Option C is incorrect because filtering on a timestamp still reads all files and records, so it does not reduce I/O or cost. Option D is incorrect because switching to Kinesis changes the ingestion architecture and does not address reprocessing of existing S3 files.
