Lesson 7 of 30
This platform's Docker track covers build-once-promote-everywhere as a general pipeline shape, and Frontend Practices covers CI/CD as a concept. This lesson is the specific, missing step in between: how a pipeline actually authenticates to AWS and lands a deploy, per compute target.
13 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A CI pipeline authenticates to AWS using OIDC federation instead of a stored long-lived IAM access key. What's the main security benefit?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
A CI/CD pipeline (commonly GitHub Actions, for a team not running AWS's own CodePipeline) needs two things to actually deploy to AWS: a way to authenticate as something with the right permissions, and a target-specific deploy step that differs by what's being deployed.
Authentication first, because it's the part people get wrong: a pipeline should never hold a long-lived AWS access key as a stored secret. The current standard is OIDC federation — GitHub Actions requests a short-lived, temporary credential by proving its identity (which repo, which branch) directly to AWS, and IAM trusts that proof instead of a static key. This is the same "temporary role over long-lived credential" instinct from this track's IAM lesson, applied specifically to CI.
aws s3 sync ./dist s3://my-bucket --delete, then aws cloudfront create-invalidation for the non-hashed entry file — exactly the two-tier caching strategy from this track's CloudFront lesson, now as the actual deploy command.aws lambda update-function-code, pointing at a new deployment package or container image — the fastest of the three, since there's no server to roll, just a function definition to swap.s3 sync --delete removes files from the bucket that aren't in the local build output — necessary to actually clean up assets from old builds, but a real, destructive flag: syncing the wrong local directory, or one missing expected files, deletes production assets, not just adds new ones."How does your CI pipeline actually authenticate to deploy to AWS?" is a real, specific security-and-practice question — "we use OIDC federation, not a stored access key" is a concrete, current-best-practice answer that signals real production experience, versus not having a specific answer at all.