...
- Find out where the key is used.
- Ansible's group_vars/vault has most of the keys and you can then rapidly search to see where they are used
- Capistrano's aws_credential file is another spot
- Local server(s) with access to AWS resources are also a place to look (dubnium, and cloudberry)
- If the threat assessment shows you do not need to risk downtime
- In IAM (https://console.aws.amazon.com/iam/home?region=us-east-1#/users ) go to the affected key and the Security Credentials tab
- Generate a new Access Key
- Download/save the access key CSV to share as needed
- Update the access key (may require running ansible updates after editing the vault file or changing server config files)
- Check that the old access key(s) are removed
- Set the old access keys to inactive with the
Make Inactive
link, which disables them. They can easily be reactivated if a problem occurs. - Check that service functions normally
- Delete the old access keys.
- If the threat assessment shows that we can risk downtime, first disable the affected key.
- If a production server will be broken, set maintenance mode or a downtime server to let users know service is disrupted.
- Then follow steps under 2.