Interview Prep/CI/CD/Secrets and Credentials

How should deploy credentials be scoped for a staging versus production pipeline?

BeginnerProductionSecrets and Credentials
Answer

Separate identities per environment with least privilege: a staging role can only touch staging, and the production role is only assumable by jobs running on protected refs/environments with approval. Production credentials never exist in PR pipelines or on shared agents. Separate AWS accounts per environment add a hard boundary.

All CI/CD questions

More on Secrets and Credentials