Send Slack Alerts for AWS IAM Access Keys Older Than 365 Days
AWS IAM Access Key Rotation Reminder Automation Workflow Watch the demo video below:
Who’s it for
DevOps/SRE teams responsible for AWS account security.
Security/compliance officers ensuring key rotation policies are followed.
Any AWS account owner who wants automatic detection of stale access keys.
How it works / What it does
Weekly Scheduler — triggers the workflow on a recurring basis.
Get Many Users — fetches all IAM users in the AWS account.
Get User Access Key(s) — retrieves the access keys associated with each user.
Filter Out Inactive Keys — removes keys that are not active (e.g., status Inactive).
Access Key Older Than 365 Days — checks the key creation date and flags keys older than one year.
Send Slack Message — notifies a Slack channel with details of the outdated key(s) for review and action.
No Operation — safely ends the workflow if no keys match the condition.
How to set up
Configure the Weekly Scheduler to run at your desired cadence (e.g., every Monday).
Use Get Many Users to list all IAM users.
For each user, call ListAccessKeys (Get User Access Key(s)) to fetch their key metadata.
Apply a filter to keep only keys with status Active.
Add a condition to compare CreateDate against today - 365 days.
Send results to Slack using the Slack Post Message node.
Requirements
n8n (latest version).
AWS credential in n8n configured for us-east-1 (IAM requires signing with this region).
IAM permissions:
iam:ListUsers
iam:ListAccessKeys
Slack bot credentials with permission to post messages in the desired channel.
How to customize the workflow
Change threshold** — adjust the 365 days condition to 90, 180, or any other rotation policy.
Escalation** — mention @security or create a Jira/Ticket when old keys are found.
Logging** — push flagged results into a Google Sheet, database, or log management system for audit.
Automation** — instead of only notifying, add a step to automatically deactivate keys older than the threshold (after approval).
Multi-account support** — duplicate or loop across multiple AWS credentials if you manage several AWS accounts.
Related Templates
Automated SEO Performance Collection from Google Search Console to NocoDB
Problem Monitoring SEO performance from Google Search Console (GSC) manually is repetitive and prone to human error. Fo...
Automated Work Attendance with Location Triggers
his workflow automates time tracking using location-based triggers. How it works Trigger: It starts when you enter or e...
Lookup IP Geolocation Details with IP-API.com via Webhook
This n8n template enables you to instantly retrieve detailed geolocation information for any given IP address by simply ...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments