6/32
Sign inSign up free

1121. Rotate the CI Key Without Breaking CI

medium 20 XP ~12 minHands-on lab

The CI pipeline signs in as the IAM user courier-api-ci, with the key saved in ~/ci/credentials (profile ci). The key is a year old, and security wants it rotated today. The user also has a second key that someone made for a test and never used.

Task

  • ~/ci/credentials (profile ci) holds a new key for courier-api-ci, and it works.
  • The key CI used until now is deactivated, not deleted, so CI can be rolled back if something still uses it.
  • The never-used test key is gone.

Use aws iam get-access-key-last-used to tell the keys apart. This machine has an AWS-style account (an emulator: nothing is billed). IAM policies are enforced. Your AWS CLI is signed in as the account's administrator.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.