- Go to IAM on AWS Dashboard
- Find the user and click on the user to view the keys.
- Make it key inactive and delete the key
- Create a new key for the user.
- Review the cloud-trail (if available) logs for any malicious access for the key.
Many developer accidentally add AWS access key and secret in the code as a variable. Assume it has been compromised and follow the steps below: