A social media company ingests user activity data from multiple sources into Amazon S3. The data is in JSON format and includes fields: user_id, activity_type, timestamp, and metadata. The company wants to transform this data into a columnar format (Parquet) partitioned by date and activity_type for efficient querying with Amazon Athena. The pipeline must handle data that arrives up to 3 days late. Currently, a daily AWS Glue ETL job scans the entire S3 bucket for new files, transforms them, and writes to a separate output bucket. The job is taking longer as data volume grows, and the team wants to reduce processing time and cost. What should the engineer do?
This enables incremental processing, reduces scan time, and is cost-effective.
Why this answer
Using S3 event notifications with Lambda to trigger a Glue job for each new file allows incremental processing, reducing the time and cost of scanning the entire S3 bucket. Option A (increasing DPUs) does not address the root cause of scanning all files. Option B (partition projection) helps with query performance but not with the transformation process.
Option C (replacing Glue with EMR) adds operational overhead and is not necessary for this use case.