πŸ”’ Monitor & alert on inactive AWS IAM users with Slack notifications

⚑ 278 views Β· πŸ”’ SecOps & Security Automation

Description

AWS IAM Inactive User Automation Alert Workflow

> Weekly job that finds IAM users with no activity for > 90 days and notifies a Slack channel.
> ⚠️ Important: AWS SigV4 for IAM must be scoped to us-east-1. Create the AWS credential in n8n with region us-east-1 (even if your other services run elsewhere).

Who’s it for

How it works / What it does

  1. Weekly scheduler – kicks off the workflow (e.g., every Monday 09:00).
  2. Get many users – lists IAM users.
  3. Get user – enriches each user with details (password status, MFA, etc.).
  4. Filter bad data – drops service-linked users or items without usable dates.
  5. IAM user inactive for more than 90 days? – keeps users whose last activity is older than 90 days.
    • Last activity is derived from any of:
      • PasswordLastUsed (console sign-in)
      • AccessKeyLastUsed.LastUsedDate (from GetAccessKeyLastUsed if you add it)
      • Fallback to CreateDate if no usage data exists (optional)
  6. Send a message (Slack) – posts an alert for each inactive user.
  7. No operation – path for users that don’t match (do nothing).

How to set up

  1. Credentials
    • AWS (Predefined β†’ AWS)
      • Service: iam
      • Region: us-east-1 ← required for IAM
      • Access/Secret (or Assume Role) with read-only IAM perms (see below).
    • Slack OAuth (bot in your target channel).

Requirements

How to customize the workflow

Notes & gotchas

πŸ”— Nodes Used

HTTP Request, Slack, Schedule Trigger, Filter, AWS IAM

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup