Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

225
Vistas
Auto Rotation of Secret Key and Access Key in AWS using Lambda

I want to rotate Access Key and Secret Key automatically using Lambda. (boto3)

Condition is like:

  1. At 85 day of key age user will get a Email for warning
  2. At 90 day Age user will receive a new credential via Email.
  3. At 95th day the old key gets deactivate automatically.(user need to login via fresh Access key and secret key)

    Is this is possible using AWS lambda? Can anyone help me with the code?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Yes. Writing code is use-case specific. You can start writing it yourself and then ask again if you have any specific issue.

But generally, to implement periodic rotation you would use:

  • CloudWatch Event scheduled rules

The rule would automatically call a target, i.e. your lambda function, which would have logic to perform the rotation. For that boto3's create_access_key_pair along with deleting/disable existing keys (delete_access_key or update_access_key to disable).

over 4 years ago · Santiago Trujillo Denunciar

0

Yes this is definitely possible, the AWS SDK has a action for list_access_keys.

If you created a CloudWatch event you could trigger this Lambda every day. Once you call the request you can see all access keys with a UserName value and a CreateDate value.

By doing a comparison between the 2 dates you could then perform the requested action.

  • Using either SES or SNS notify the user at 85 days
  • Use the create_access_key method at 90 days
  • Use the delete_access_key at 95 days.
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda