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 Respuesta
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
respondido hace 2 años
profile pictureAWS
EXPERTO
revisado hace 2 años
  • 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?

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas