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?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南