AWS, Azure & GCP · Cloud across providers

How does CI/CD work with cloud infrastructure?

Mediumci-cdoidcdeploymentUpdated Oct 2026
Quiz this track

Short answer

CI builds and tests on every change; CD deploys through environments with approvals and automated rollback. Cloud pipelines use OIDC federation for short-lived credentials instead of stored long-lived keys.

A cloud pipeline has two flows: application delivery and infrastructure delivery. Both need the same properties: reproducible builds, environment promotion, approvals where risk justifies them, and a fast rollback path.

Pipeline stages

  • Build and unit test on every commit
  • Scan dependencies, containers and IaC for vulnerabilities and policy violations
  • Plan infrastructure on pull requests and apply after merge
  • Deploy progressively with canary or blue-green where possible
  • Run smoke tests and roll back automatically on failure
  • Authenticate with OIDC federation rather than stored cloud keys
yaml
permissions:
  id-token: write
  contents: read
steps:
  - uses: aws-actions/configure-aws-credentials@v4
    with:
      role-to-assume: arn:aws:iam::123456789012:role/deploy
      aws-region: ap-south-1
A GitHub Actions job exchanging an OIDC token for a temporary role.

Separate build from deploy and keep environment credentials scoped per environment. A pipeline that can deploy to production on every branch is a security and reliability risk. Immutable image tags and versioned artifacts make rollbacks deterministic.

Deployment is not done when the pipeline turns green. Verify health, error rate and latency in the target environment, and keep the previous artifact ready for rollback.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1Why use OIDC instead of storing cloud access keys in CI?
  2. 2How do you roll back a bad infrastructure change?
  3. 3What is the difference between canary and blue-green deployment?
  4. 4How do you keep environment credentials scoped?

Say it in the interview

CI builds and tests every change, and CD promotes artifacts through environments with approvals and automated rollback. I authenticate pipelines with OIDC so they exchange a token for short-lived cloud credentials instead of storing keys. I also plan infrastructure on pull requests, apply after merge, and verify health after deploy rather than assuming a green pipeline means success.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live AWS, Azure & GCP mock interview and get scored feedback on depth, clarity and confidence.