https://github.com/iammukeshm/aws-iam-access-key-rotation-lambda
Automated AWS IAM Access Key Rotation with AWS Lambda, EventBridge Scheduler, SNS and .NET
https://github.com/iammukeshm/aws-iam-access-key-rotation-lambda
access-key aws dotnet dotnet-on-aws iam lambda security
Last synced: 3 months ago
JSON representation
Automated AWS IAM Access Key Rotation with AWS Lambda, EventBridge Scheduler, SNS and .NET
- Host: GitHub
- URL: https://github.com/iammukeshm/aws-iam-access-key-rotation-lambda
- Owner: iammukeshm
- Created: 2024-02-17T19:45:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-19T05:27:51.000Z (over 1 year ago)
- Last Synced: 2025-02-14T14:56:13.687Z (5 months ago)
- Topics: access-key, aws, dotnet, dotnet-on-aws, iam, lambda, security
- Language: C#
- Homepage: https://codewithmukesh.com/blog/automated-aws-iam-access-key-rotation/
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Automated AWS IAM Access Key Rotation
## with AWS Lambda, EventBridge Scheduler, SNS, and .NET!
Proposed Workflow:
1. Gets a list of users and iterates through each of them.
2. Gets a list of access keys attached to the user and iterates through it,
3. Calculate the age of each key.
4. If the key age is within 60 - 70 days and is in an active state, we will create a new access key. A notification email will be sent to the user via SNS Topic Subscription.
5. If the key age is within 80 - 90 days, we will consider it eligible for deactivation. The keys will be deactivated and the notification will be sent over to the user.
6. If the key age is above 90 days, the keys will be deactivated and the notifications will be sent to the user.
7. Using Amazon Event Bridge Scheduler, we will have to ensure that the Lambda is scheduled to run every week.

This ensures that your Access Keys are always secured and rotated. The Complete Source code is attached to the article!
Read: https://codewithmukesh.com/blog/automated-aws-iam-access-key-rotation/
## Subscribe to my YouTube Channel ❤️
Do support me by subscribing to my YouTube channel for more .NET Content!
https://www.youtube.com/@codewithmukesh/