The use case - access key rotation
For CLI access, you have to have an access key. This poses a security risk. Recycling access keys and secret access keys on a regular basis is considered as a well-known security best practice. This way you can reduce the impact on the business if the keys are comprised. Having an established process ensuring operational success, without impacting application functionality, is a key to ensuring that recycling the key is not a challenging task and is error free.
In order to rotate access keys and secret access keys, you should follow these steps:
- Create a second access key: While the first access key is still active, you can create the second access key using the
New-IAMAccessKey
cmdlet. The new access key created will be active by default.
PS C:\>New-IAMAccessKey -UserName Ramesh
Access keys and secret access keys will be displayed on the screen. As mentioned earlier, this is the only time that you will see the secret key on the screen. Save and secure it...