Courseiva
Data Operations and SupporthardMultiple ChoiceObjective-mapped

DEA-C01 Data Operations and Support Practice Question

A data pipeline uses AWS Glue to run ETL jobs that read from and write to an Amazon Redshift cluster. The pipeline recently started failing with the error 'ERROR: cannot execute INSERT in a read-only transaction'. The Glue job's IAM role has the necessary permissions. What could be the cause of this error?

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 is using a transaction that was opened in read-only mode.

The error 'ERROR: cannot execute INSERT in a read-only transaction' occurs when attempting to write data within a transaction that was opened as read-only. In AWS Glue ETL jobs, if the Spark session is configured with `auto_commit=False` or if the job explicitly starts a read-only transaction (e.g., via `SET TRANSACTION READ ONLY`), any subsequent INSERT operation will fail. Option A correctly identifies this cause. Option B is incorrect because Redshift clusters do not enter a read-only mode during maintenance; instead, they are briefly unavailable. Option C is incorrect because Glue connections do not have a 'read-only' property; the connection string may set `defaultTransactionIsolation`, but not a read-only flag. Option D is incorrect because the IAM role has necessary permissions per the question stem, and insufficient permissions would produce a different error (e.g., permission denied).

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 is using a transaction that was opened in read-only mode.

    Why this is correct

    If auto_commit=False and the first operation is a SELECT, the session becomes read-only; subsequent INSERT fails.

  • The Redshift cluster is in read-only mode due to maintenance.

    Why it's wrong here

    Redshift maintenance does not put the cluster in read-only mode.

  • The Glue connection is configured with 'read-only' set to true.

    Why it's wrong here

    Glue connections do not have a read-only property.

  • The Glue job's IAM role does not have sufficient Redshift permissions.

    Why it's wrong here

    The role has necessary permissions; the error is about transaction state, not authorization.

About these practice questions

This DEA-C01 question is part of Courseiva's 1,711-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 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.