Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

224
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda