Delivering Data Pipelines with CI/CD
This lesson explains how continuous integration and continuous delivery (CI/CD) apply automated builds, checks and deployments to data pipelines, so changes reach production quickly, consistently and safely.
Learning outcomes
After completing this lesson, you will be able to:
- Describe what continuous integration checks for data pipelines.
- Promote changes through environments with AWS CodePipeline.
- Supply configuration per environment.
Continuous integration
Continuous integration (CI) checks every change automatically before it is merged, so problems are found within minutes rather than in production. For data pipelines, CI is typically run with AWS CodeBuild or GitHub Actions and performs several kinds of check.
Linting and formatting checks keep Python and SQL consistent and catch simple errors. Unit tests run transformation functions against small, known inputs and check the outputs. Infrastructure code is validated with tools such as cfn-lint, which finds template errors, and AWS CloudFormation Guard, which checks templates against policies such as "every bucket must be encrypted". Finally, CI packages the deployable artefacts, such as Glue scripts, Lambda packages and container images, so that later stages deploy exactly what was tested.
CI checks
Continuous delivery
Continuous delivery moves tested changes into production through automated stages. AWS CodePipeline deploys infrastructure and job code stage by stage, typically to separate AWS accounts for development, test and production, so that a mistake in one environment cannot affect another. The same artefact built during CI is promoted through every stage rather than rebuilt for each, so production runs exactly what was tested.
For Lambda functions in a pipeline, AWS CodeDeploy shifts traffic to a new version gradually, as a canary or in linear steps, and rolls back automatically if CloudWatch alarms fire; AWS SAM configures this with a deployment preference in the template. A manual approval step before production gives a person the final decision for significant changes, and failed deployments roll back automatically.
Continuous delivery
Configuration per environment
The same pipeline code is deployed to development, test and production, so values that differ, such as bucket names, endpoints and role ARNs, must be supplied from outside the code. IaC parameters provide values chosen at deployment time for each environment. Glue job arguments pass values to a job when it runs, such as the source path. Parameter Store, part of Systems Manager, holds shared configuration that code reads at run time. Secrets Manager holds credentials, such as database passwords, encrypted and with automatic rotation, so they never appear in code or logs. The following table summarises the mechanisms.
| Mechanism | Use for |
|---|---|
| IaC parameters | Values that differ by environment at deployment time |
| Glue job arguments | Values passed to jobs at run time |
| Parameter Store | Shared configuration read at run time |
| Secrets Manager | Credentials and other secrets |
The following diagram shows the stages of a deployment pipeline for a Glue job.

Configuration mechanisms
Promoting a Glue job through three accounts
A team wants every change to a Glue job to be tested and deployed consistently to development, test and production accounts. The pipeline consists of the stages described in the following table.
| Stage | Action |
|---|---|
| Source | A merge to the main branch triggers CodePipeline |
| Build | CodeBuild lints the code, runs unit tests and packages the script and template |
| Development | CloudFormation deploys to the development account |
| Test | Deploy to the test account and run the job on sample data with quality checks |
| Approval | A manual approval for production |
| Production | Deploy the same artefact with production parameters |
Bucket names, connection names and role ARNs are template parameters per account, so the code is identical in every environment. A failed stage stops the pipeline before production.
Which service runs tests and checks on every commit in an AWS pipeline?
Show answer
AWS CodeBuild.
Exam Tips
Remember for the exam
- To automate Glue job and infrastructure deployments, use CodePipeline with CloudFormation or the CDK.
- To run checks on every commit, use CodeBuild.
- Use separate AWS accounts for development, test and production.
- Promote the same artefact through every stage.
- Never hard-code environment values; use parameters or Parameter Store.