Fixing Out of Memory Errors in AWS Glue Streaming
A company uses AWS Glue to process streaming data from Amazon Kinesis Data Streams. The job fails intermittently with a 'MemoryError'. What is the MOST likely cause?
⚠ Common exam trap
Watch out — candidates often confuse memory errors with throttling or connectivity issues, leading them to pick insufficient shards (Option D) or cross-region problems (Option C), when the root cause is almost always an undersized worker type for the data volume.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The Glue job worker type is too small for the data volume
The 'MemoryError' in AWS Glue indicates that the worker type allocated to the job does not have sufficient memory to process the data volume. Glue workers (Standard, G.1X, G.2X) have fixed memory allocations (e.g., 16 GB for Standard), and if the streaming data from Kinesis exceeds this, the job fails. Increasing the worker type or the number of workers resolves this.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The Glue job worker type is too small for the data volume
Why this is correct
MemoryError indicates the worker's heap is exhausted during processing. A too-small worker type provides insufficient memory for the Kinesis stream's volume, so the job fails intermittently as load spikes. Scaling the worker type directly addresses the memory constraint.
- ✗
The Glue job uses too many DynamicFrames
Why it's wrong here
DynamicFrames are the standard Glue abstraction and their count does not drive heap exhaustion; memory scales with partition size and shuffle state. Reducing DynamicFrames is relevant when simplifying transforms, not when diagnosing intermittent MemoryError during Kinesis micro-batch processing.
- ✗
The S3 output bucket is in a different region
Why it's wrong here
Cross-region S3 writes affect latency and data-transfer cost, not worker heap usage, so they cannot produce MemoryError. Region alignment matters for compliance or performance tuning, but the failure here originates in executor memory during stream processing.
- ✗
The Kinesis stream has insufficient shards
Why it's wrong here
Insufficient shards cause throttling and iterator age growth, surfacing as ReadProvisionedThroughputExceeded rather than MemoryError. Adding shards is the fix for throughput starvation, but the stem's intermittent heap exhaustion points to per-microbatch data volume and aggregation state.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 1,321 original DEA-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on DEA-C01
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company is using AWS Glue to process streaming data from Amazon Kinesis Data Streams. The job fails intermittently with a 'MemoryError' when the stream has a sudden spike in data volume. Which configuration change would best prevent this error?
medium- ✓ A.Increase the number of DPUs (Data Processing Units) for the Glue job.
- B.Store intermediate results in Amazon RDS.
- C.Use a batch transformation instead of streaming.
- D.Increase the number of shards in the Kinesis data stream.
Why A: Increasing the number of DPUs for the AWS Glue job provides more compute and memory resources to the job, which directly addresses the MemoryError caused by sudden data volume spikes. Glue DPUs are the unit of processing capacity, and scaling them up allows the job to handle larger volumes without running out of memory. This is the most direct configuration change to prevent memory-related failures.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DEA-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DEA-C01 exam.