⚡ Only 300 spots remaining • Closes in 2d 14h 32m

Back to Workflow Library
Cloud Services

AWS IAM Inactive User Checker

Ensure security compliance and remove unused access. This workflow audits your AWS IAM users every week, checks their last console login and password age, and lists all users who have not logged in for 90+ days. A detailed list is emailed to the security team.

#AWS IAM
#Security
#Compliance
#Audit
#Cloud

Automation Logic

n8n JSON Blueprint

This workflow is pre-configured and ready for deployment. Simply import the JSON template into your n8n instance and configure your credentials.

This is an exclusive blueprint. Copy the JSON below to use it.

QUICK DEPLOY

  • 1
    Download the .json file
  • 2
    Open n8n & click "Import"
  • 3
    Configure your API keys

PRO TIP

Always test your workflow in a development environment before pushing to production.

JSON BLUEPRINT

n8n-workflow.json
{
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "value": 1
            }
          ]
        }
      },
      "name": "Weekly Audit",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        100,
        300
      ]
    },
    {
      "parameters": {
        "resource": "user",
        "operation": "list"
      },
      "name": "List IAM Users",
      "type": "n8n-nodes-base.awsIam",
      "typeVersion": 1,
      "position": [
        300,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.filter(item => {\n  const lastActive = new Date(item.json.passwordLastUsed);\n  const diffTime = Math.abs(new Date() - lastActive);\n  const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n  return diffDays > 90;\n});"
      },
      "name": "Filter Inactive (90+ Days)",
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [
        500,
        300
      ]
    },
    {
      "parameters": {
        "toEmail": "[email protected]",
        "subject": "AWS IAM Inactive Users Report",
        "html": "The following users have not logged in for over 90 days:<br><ul>{{$json.map(u => '<li>' + u.userName + ' (Last active: ' + u.passwordLastUsed + ')</li>').join('')}}</ul>"
      },
      "name": "Email Admin Report",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "position": [
        700,
        300
      ]
    }
  ],
  "connections": {
    "Weekly Audit": {
      "main": [
        [
          {
            "node": "List IAM Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List IAM Users": {
      "main": [
        [
          {
            "node": "Filter Inactive (90+ Days)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Inactive (90+ Days)": {
      "main": [
        [
          {
            "node": "Email Admin Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

To use this, copy the JSON above and paste it directly onto your n8n canvas.

IMPLEMENTATION GUIDE

Required Nodes

  • AWS IAM Node
  • Security Node
  • Compliance Node
  • Audit Node
  • Cloud Node
  • Cron / Webhook Trigger

Core Benefits

  • 100% Automated Execution
  • Reduces Manual Data Entry
  • Infinite Scalability

Need Help Building Your Private Cloud?

Join the elite marketers who have offloaded their entire backend to n8n. Get direct support and custom builds in our private forum.

user