How can i enable and disable access key and secret key in CLI?

0

hello, I need to be able to deactivate and activate the access key and secret key automatically from time to time through a CLI script, is this possible? And if it is, how is it done, what commands are used?

Thanks in advance

1개 답변
3

Yes, you can do this using aws cli. You can run these commands to activate/deactivate access keys:

aws iam update-access-key --access-key-id AKIAIOSFODNN7EXAMPLE --status Inactive --user-name Bob
aws iam update-access-key --access-key-id AKIAIOSFODNN7EXAMPLE --status Active --user-name Bob

See reference docs here

profile pictureAWS
답변함 2년 전
profile pictureAWS
전문가
검토됨 2년 전
  • Thanks for the answer, now I have another question, is it possible to condition the activation of the access key? so that it only fires when I have new records in a database in aws timestream?

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

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

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

관련 콘텐츠