AWS Certified DevOps Engineer – ProfessionalSDLC AutomationMedium

A company is developing a microservices architecture. Each microservice has its own codebase, build process, and deployment lifecycle. They need to ensure that when a developer pushes changes to a microservice's repository, only that specific microservice is rebuilt, tested, and deployed, without affecting other services. Which strategy should be implemented to achieve this efficient and isolated CI/CD process?

  1. ACreate a single monolithic CodePipeline that monitors all microservice repositories and uses a complex conditional logic to deploy specific services.
  2. BImplement a mono-repository strategy where all microservices reside in one repository, and use CodeBuild to detect changed directories for selective builds.
  3. CDevelop individual CodePipelines for each microservice, triggered independently by changes in their respective CodeCommit repositories.
  4. DUse AWS Step Functions to orchestrate a single CodeBuild project that builds all microservices in parallel, followed by a consolidated CodeDeploy action.
Show answer & explanation

Correct answer: C. Develop individual CodePipelines for each microservice, triggered independently by changes in their respective CodeCommit repositories.

For microservices, the principle of independent deployment is key. Creating individual CodePipelines for each microservice, triggered by changes in their dedicated repositories, ensures isolation and efficiency, as only affected services are processed. This aligns with the microservices architectural style.

Why the other options are wrong

  • A. A monolithic pipeline with complex logic negates the benefits of microservices independence and becomes a single point of failure and complexity.
  • B. While a mono-repo can work, it often introduces complexity in managing dependencies and build times for microservices. The question implies separate codebases, making individual repositories and pipelines more aligned with typical microservice principles.
  • D. Step Functions are for workflow orchestration but not the primary CI/CD orchestrator. Building all microservices in parallel in a single CodeBuild and then consolidating deployment defeats the purpose of isolated microservice deployments.

Microservice CI/CD

A CI/CD strategy where each microservice has its own independent pipeline, allowing for isolated builds, tests, and deployments.

  • Each microservice has its own codebase and repository.
  • Dedicated CI/CD pipeline for each microservice.
  • Independent deployment cycles.
  • Reduces blast radius of changes.

Memory trick: Independent Pipelines for Independent Services Ensure Seamless Operations.

More SDLC Automation questions