How to automate access key rotation for IAM users

1

Hello everyone,

I am trying to figure out a way to automate access key rotation for IAM users. We have several users that have their own IAM programmatic access key and I am trying to figure out a way to force the user to rotate their access key after 90 days. It would be nice to also have some sort of SNS topic that will inform the user.

I attempted to use the ASA Key Rotation document that AWS provided but kept on running into CloudFormation template errors which include Malformed Document and missing resources in the .PY files.

https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/automatically-rotate-iam-user-access-keys-at-scale-with-aws-organizations-and-aws-secrets-manager.html

Any guidance on this would be awesome.

Thank you!

3개 답변
0

If the credentials are for users, a best practice would be to use temporary credentials. Access keys are long-term credentials that you may not need.

  • Here is a blog that shows you how to get temporary credentials with AWS IAM Identity Center.

  • You can also get temporary credentials with the AWS CLI and AWS IAM Identity center. Here is a knowledge center article.

If you still want to use the aws-iam-access-key-auto-rotation solution, it looks like the files are on the GitHub repo.

profile pictureAWS
답변함 일 년 전
0

Here is an alternative that is well documented. I didn't try it but it should work. It uses AWS Secret Manager and Lambda, with SNS for notification as required.

Shams
답변함 3달 전
-1

You might want to also consider transitioning these IAM Users to IAM Roles Anywhere.

profile pictureAWS
전문가
kentrad
답변함 일 년 전
  • This does nothing except extend roles to workloads outside of AWS, why is it any more applicable here than using standard roles?

  • It transitions from using IAM Users with long-term access keys that have to be rotated to using IAM Roles that have short-term access keys.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠