Skip to content

This project automates secret key rotation in AWS Secrets Manager using a Lambda function. The function periodically generates and updates secrets, ensuring enhanced security without manual intervention.

Notifications You must be signed in to change notification settings

AymaneK24/Secrets-Manger-AWS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Secret Key Rotation with Lambda

Overview

This project automates secret key rotation in AWS Secrets Manager using an AWS Lambda function. The function periodically generates and updates secrets, ensuring enhanced security without manual intervention.

Steps

1. Create a Lambda Function

The function will handle the secret rotation logic, including generating a new key, updating the secret, and configuring the old key for expiration.

2. Configure Secrets Manager

Define the secret that needs to be rotated and set the rotation schedule (e.g., every 30 days).

3. IAM Role Permissions

Ensure the Lambda function has appropriate permissions to read, update, and rotate secrets.

4. Trigger Lambda for Rotation

Secrets Manager will automatically trigger the Lambda function based on the defined schedule.

5. Automated Secret Management

The function will update the secret value in AWS Secrets Manager, ensuring the new key is in use while invalidating the old one.

Benefits

  • Enhanced Security: Regularly rotates secrets to minimize security risks.
  • Automation: Eliminates manual secret updates.
  • AWS Integration: Uses AWS-native services for seamless operation.

Demonstration

After 1st Rotation

After 2nd Rotation

License

This project is licensed under the MIT License.

About

This project automates secret key rotation in AWS Secrets Manager using a Lambda function. The function periodically generates and updates secrets, ensuring enhanced security without manual intervention.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages