LearningTree Β· AWS Β· DevOps & Developer Tools

DevOps & Developer Tools β€”
Automate Everything from Code to Cloud

CloudFormation, CDK, CodePipeline, CodeBuild, CodeDeploy, CodeCommit β€” infrastructure as code and CI/CD services that automate the path from code commit to production deployment.

CloudFormation CodePipeline CodeBuild CodeDeploy
01
Chapter One

Why DevOps on AWS?

DevOps on AWS means automating every step from infrastructure provisioning (IaC) to application deployment (CI/CD). The goal: push code β†’ automatically build, test, and deploy to production β€” with rollback if anything fails.

The Two Pillars of AWS DevOps
πŸ—οΈ

Infrastructure as Code (IaC)

  • Define infrastructure in code (templates or programs)
  • Version-controlled, repeatable, testable
  • Create identical environments on demand
  • Delete a stack β†’ all resources cleaned up
  • Services: CloudFormation, CDK
πŸš€

CI/CD Pipeline

  • Automate build, test, and deploy on every commit
  • Catch bugs early with automated testing
  • Deploy with blue/green, canary, or rolling strategies
  • Rollback automatically on failure
  • Services: CodePipeline, CodeBuild, CodeDeploy
The DevOps Spectrum β€” Define to Deploy
← Infrastructure Application deployment β†’
CloudFormation
IaC (YAML)
CDK
IaC (Code)
CodeBuild
Build & test
CodeDeploy
Deploy
02
Chapter Two

Services

Core DevOps Services
Services at a Glance
ServiceCategoryWhat It DoesBest For
CloudFormationIaCDeclarative templates (YAML/JSON) β†’ AWS resourcesAll AWS teams; exam context; simple-to-medium complexity
CDKIaCProgrammatic IaC (Python/Java/TS) β†’ synthesizes to CFNDev teams; complex logic; reusable constructs; unit testing infra
CodePipelineCI/CDOrchestrates end-to-end release pipelinesAutomating source β†’ build β†’ test β†’ deploy workflows
CodeBuildCI/CDFully managed build service (compile, test, package)Running builds without managing Jenkins/build servers
CodeDeployCI/CDAutomated deployments to EC2, ECS, LambdaBlue/green, canary, and rolling deployments with rollback
CodeCommitSourceManaged Git repositoriesPrivate repos within AWS (being deprecated β€” prefer GitHub)
CodeArtifactArtifactsManaged artifact repository (npm, Maven, pip)Caching and hosting private packages
03
Chapter Three

Decision Guide

When to Use What
If you need…Use…
Define infrastructure in a simple declarative templateCloudFormation
Write infrastructure with loops, conditions, and unit testsCDK
Orchestrate a multi-stage release pipelineCodePipeline
Compile code, run tests, produce artifactsCodeBuild
Deploy to EC2/ECS/Lambda with blue/green or canaryCodeDeploy
Host private Git repositories in AWSCodeCommit (or GitHub)
Cache npm/Maven/pip packages privatelyCodeArtifact
Multi-cloud IaC (AWS + Azure + GCP)Terraform (not AWS-native)
CloudFormation vs CDK β€” Quick Decision
ScenarioCloudFormationCDK
Simple stacks, small teamsβœ… Simpler to startOverkill
Complex logic (loops, inheritance)Limitedβœ… Full language power
Unit testing infrastructureNot possibleβœ… pytest / JUnit / Jest
IDE autocomplete & type safetyLimited (YAML)βœ… Full IDE support
Reusable components across teamsNested stacks (meh)βœ… Construct libraries
AWS exam contextβœ… Primary exam focusSecondary
04
Chapter Four

Pipeline Flow

How the Services Connect β€” End-to-End Pipeline
Source
Source
CodeCommit / GitHub
β†’
Build
Build
CodeBuild
β†’
Artifact
Artifact
S3 / CodeArtifact
β†’
Deploy
Deploy
CodeDeploy
β†’
Production
Production
EC2 / ECS / Lambda

CodePipeline orchestrates this entire flow β€” connecting source, build, and deploy stages into an automated release pipeline that triggers on every code push.

IaC + CI/CD Together
πŸ—οΈ

IaC Pipeline

  • Template changes pushed to Git
  • CodePipeline triggers
  • CloudFormation Change Set created
  • Manual approval β†’ execute
  • Infrastructure updated safely
πŸš€

App Pipeline

  • Application code pushed to Git
  • CodeBuild compiles + tests
  • Produces deployable artifact
  • CodeDeploy rolls out (blue/green)
  • Auto-rollback on health check failure
πŸ‘‰ Key Takeaway

AWS DevOps = IaC (CloudFormation/CDK) + CI/CD (CodePipeline/CodeBuild/CodeDeploy). Together they automate the entire lifecycle: infrastructure and application code flow from Git to production with testing, approval gates, and automatic rollback.