Study Guide · Bucket 5 of 7

DevOps, Automation & IaC

Yahan se console pe clicking band, aur sab kuch code se define hota hai. Tumhare Jenkins background ke liye yeh sabse comfortable bucket hoga.

Context
Jab tumhe hazaaron servers manage karne hon, console pe click-click karna possible nahi. Isliye Infrastructure as Code (IaC) aur CI/CD automation — yeh dono is bucket ka core hain.

AWS CloudFormationIaC — YAML/JSON

What
Infrastructure ko YAML/JSON templates mein define karne ka service — 'code se infrastructure banao'.
Why
Console pe click karke resources banana slow aur error-prone hai. CloudFormation se tum infrastructure ko version control mein rakh sakte ho, deploy/teardown/redeploy consistently kar sakte ho.
How
Template likho (resources, properties define karo) -> CloudFormation ko submit karo (stack banega) -> AWS us template ke hisaab se sab resources create karta hai. Poora stack ek command se delete bhi ho sakta hai.
Skill
YAML padhna/likhna — coding se zyada configuration hai.
  • Templates & Stacks
  • YAML structure
  • Declarative infrastructure

AWS CDKCloud Development Kit

What
Infrastructure as Code, but ek real programming language (Python/TypeScript) mein — YAML ki jagah.
Why
Programming language ka full power milta hai — loops, conditions, reusable components. Agar coding comfortable hai, CDK CloudFormation se zyada powerful aur maintainable hai.
How
Python/TypeScript mein infrastructure define karo (classes/constructs) -> CDK isko automatically CloudFormation templates mein convert karke deploy karta hai.
Skill
Python ya TypeScript comfortable hona chahiye.
  • Constructs
  • Same power as CloudFormation, better DX

CodePipeline + CodeBuild + CodeDeployCI/CD trio

What
CodePipeline: pura CI/CD workflow orchestrate karta hai. CodeBuild: code compile karke deployable artifact (JAR/Docker image) banata hai. CodeDeploy: EC2/ECS/Lambda ya on-prem pe deploy karta hai.
Why
Manual deployment error-prone aur slow hai. Yeh trio se GitHub push hote hi automatically test aur deploy ho jaata hai — Jenkins jaisa hi concept, but AWS-native.
How
GitHub push -> CodePipeline trigger -> CodeBuild code build karke image/artifact banata hai (ECR mein push) -> CodeDeploy target environment (EC2/ECS/EKS) pe deploy karta hai.
Skill
Tumhara existing Jenkins CI/CD knowledge yahan directly transfer hota hai.
  • Pipeline stages
  • Build artifacts
  • Deployment strategies (rolling, blue/green)
Real org mein
Real org mein: yeh exact pattern tumhare Philips project ke Jenkins pipeline jaisa hai — bas Jenkins ki jagah AWS-native tools. Concept same: push -> build -> test -> deploy.

Amazon EventBridgeevent bus

What
Serverless event bus — services ko events ke through connect karta hai, direct calls ke bajaye.
Why
Agar Service A directly Service B ko call kare, dono tightly coupled ho jaate hain. EventBridge se Service A sirf event emit karta hai, jo bhi interested hai woh receive kar leta hai — loose coupling, easy scaling.
How
Event pattern define karo -> jab matching event aaye, EventBridge target(s) ko trigger karta hai (Lambda, SNS, etc.).
Skill
Concept-level, JSON event patterns samajhne chahiye.
  • Event-driven architecture
  • Loose coupling
  • Event patterns & rules
Key Tasks — is bucket ko 'done' maanne se pehle
  • Ek simple CloudFormation YAML template likho jo ek S3 bucket banaye
  • Same cheez CDK (Python) mein try karo
  • GitHub push pe trigger hone wali CodePipeline banao (Skill Builder lab use karo)
  • Ek EventBridge rule banao jo S3 upload pe Lambda trigger kare