Courseiva

DEA-C01 Data Ingestion and Transformation Practice Question

A data engineer must transform data in an AWS Glue ETL job. The transform requires calling an external REST API for each record to enrich the data. The Glue job runs on AWS Glue 4.0 with Python. The engineer wants to minimize the number of API calls and improve performance. Which approach should the engineer take?

⚠ Common exam trap

The trap here is assuming that increasing DPUs or using map will automatically optimize API calls, but neither reduces the number of calls per record.

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

✓

Convert the DynamicFrame to a Spark DataFrame, use foreachPartition to batch records and call the API once per batch.

To minimize API calls in an AWS Glue job, the engineer should batch records and call the API once per batch. Converting the DynamicFrame to a Spark DataFrame and using foreachPartition allows processing each partition, accumulating records into batches, and making a single API call per batch. This reduces the number of calls and improves performance. Other options either call the API per record or do not support API calls.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Convert the DynamicFrame to a Spark DataFrame, use foreachPartition to batch records and call the API once per batch.

    Why this is correct

    Converting to a Spark DataFrame and using foreachPartition allows processing records in batches per partition. The engineer can accumulate records into batches and make a single API call per batch, reducing the number of calls. This leverages Spark's distributed processing and is efficient for external API enrichment. It minimizes API calls and improves performance by batching.

  • ✗

    Use Glue DynamicFrame's map method to call the API for each record.

    Why it's wrong here

    Using DynamicFrame.map executes a Python function for every record, which would result in one API call per record, increasing latency and potentially hitting rate limits. This does not minimize the number of API calls. Instead, the engineer should batch records and make a single API call per batch. The map method is suitable for simple transformations but not for external API calls that can be batched.

  • ✗

    Use AWS Glue's built-in transform 'ApplyMapping' to call the API.

    Why it's wrong here

    ApplyMapping is used for renaming, casting, and selecting fields; it does not support calling external APIs. It is a schema transformation, not a mechanism for enrichment via REST calls. Using it would not achieve the required API enrichment. The engineer needs a custom transformation that can batch and call the API.

  • ✗

    Configure the Glue job to use a larger number of DPUs to parallelize API calls.

    Why it's wrong here

    Increasing DPUs adds more compute resources and parallelism, but it does not reduce the number of API calls per record. Each record would still trigger an API call if the code is written that way, potentially causing more concurrent calls and rate limiting. The goal is to minimize calls, not just parallelize them. Batching is the key.

About these practice questions

This DEA-C01 question is part of Courseiva's 1,321-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

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.