Course menuDEA-C01

Exams / DEA-C01 / Study guide / IaC, AWS SAM and CI/CD for pipelines

IaC, AWS SAM and CI/CD for pipelines: DEA-C01 study notes and practice questions

What to know about IaC, AWS SAM and CI/CD for pipelines for the DEA-C01 exam, from the Data Ingestion and Transformation domain (34% of the exam guide), then 1 free question to test it. Part of the DEA-C01 study guide.

Last verified against current AWS documentation ·How we write our questions

What to know for the exam

These questions ask how to deploy data pipelines repeatably and safely across environments.

Infrastructure as code

Tool Notes
AWS CloudFormation Templates for Glue jobs, crawlers, Step Functions, Kinesis, Redshift, IAM roles
AWS CDK Write infrastructure in Python, TypeScript and others; synthesizes CloudFormation
AWS SAM Simplified templates for serverless apps (Lambda, API Gateway, Step Functions, DynamoDB); sam build, sam deploy, local testing
Terraform Common third-party option
  • Drift detection finds resources changed by hand outside templates.
  • Parameters and separate stacks for dev, test and prod.
  • Change sets preview updates.

CI/CD

  • Store templates, Glue scripts, SQL and DAGs in Git (GitHub, GitLab, Bitbucket and others; AWS CodeCommit closed to new customers).
  • AWS CodePipeline with CodeBuild runs tests and deploys stacks; GitHub Actions and other tools work too.
  • Test data code: unit tests for transformation logic, data quality checks on sample data, and integration tests in a test environment.
  • Promote the same artifact through environments instead of rebuilding.

Practices for data pipelines

  • Version Glue scripts in S3 or Git, referenced by the job definition.
  • Parameterize bucket names, database names and dates.
  • Idempotent jobs so a re-run doesn’t duplicate data.
  • Least-privilege roles defined in the same templates.

Common traps

  • Editing production jobs in the console, causing drift.
  • SAM vs CDK. SAM targets serverless resources simply; CDK covers anything in CloudFormation with code.
  • No tests for transformation logic.
  • Hardcoding account IDs and bucket names in job scripts. Pass them as parameters per environment so the same template deploys to dev and prod.

Try the 1 practice question

A regional bank manages its data pipelines with AWS CloudFormation stacks, and every deployment runs through a CI/CD pipeline. During an incident, engineers changed several Glue job settings and an S3 lifecycle rule directly in the console, and nobody recorded every change.

The team wants a list of every resource that no longer matches its template. The next deployment must then set those resources back to the template values without deleting or recreating them.

Which approach meets these requirements?

Choose one answer.

  1. A. Run drift detection on each stack, then deploy through the pipeline with a drift-aware change set that reverts drifted properties to the template values.
  2. B. Redeploy each stack's current template through the pipeline with a standard change set, which resets every resource to the template values.
  3. C. Delete each stack and create it again from its template, so that every resource returns to the declared settings.
  4. D. Search AWS CloudTrail for console changes during the incident, and reverse each one by hand in the console before the next deployment.
Show the answer and explanation

Answer: A

  • A. Right: Correct. Drift detection compares each resource's live settings with its template and lists the differences. A drift-aware change set, created with the REVERT_DRIFT deployment mode, compares the actual state as well as the template and updates the drifted properties in place. Learn more: Using drift-aware change sets (opens in a new tab)
  • B. Wrong: A standard change set compares the new template with the previous template, not with the live resources. Because the template has not changed, the drifted properties are not touched, and the deployment does not list what drifted. Learn more: Update CloudFormation stacks using change sets (opens in a new tab)
  • C. Wrong: Deleting a stack deletes the resources it manages, which can lose data and interrupt the pipelines. The bank asked to restore the settings without recreating the resources.
  • D. Wrong: CloudTrail shows who called which API, but it does not compare live resources with the templates, so changes can be missed. Manual fixes in the console also bypass the pipeline the team relies on.

Explanation

Drift detection shows which resources no longer match their templates, so the team sees every out-of-band change rather than only the ones it remembers. A standard change set compares templates only and leaves drift in place, while a drift-aware change set compares the actual state and puts the drifted properties back to the template values. Recreating stacks or fixing changes by hand from CloudTrail misses a requirement.

Study

Want more on IaC, AWS SAM and CI/CD for pipelines? The 5 full-length practice sets have 5 more IaC, AWS SAM and CI/CD for pipelines questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets

Study IaC, AWS SAM and CI/CD for pipelines

More Data Ingestion and Transformation topics