aws-iam

aws-iam is a skill for Claude Code, Codex from BagelHole/DevOps-Security-Agent-Skills. It costs 33 tokens per session (3,376 once invoked), scanned A, original, MIT.

A guide to AWS Identity and Access Management (IAM), the AWS service that controls which people, applications, and services can access which resources.

In plain words
What is it for?
Use it to create roles and policies, enforce least-privilege access, configure multi-factor authentication, set up identity federation, and audit permissions.
Why use it?
It helps prevent overly broad permissions and makes access easier to review. It also covers secure access between AWS accounts and automated systems such as GitHub Actions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create roles and policies, enforce least-privilege access, configure multi-factor authentication, set up identity federation, and audit permissions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bagelhole/devops-security-agent-skills/aws-iam
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill aws-iam
Clone the repo
git clone --depth 1 https://github.com/BagelHole/DevOps-Security-Agent-Skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for aws-iam

README.md
[![agentmods](https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/aws-iam/github.svg)](https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/aws-iam)
Your own site
<a href="https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/aws-iam"><img src="https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/aws-iam/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for aws-iam

Your own site · 80×15
<a href="https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/aws-iam"><img src="https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/aws-iam.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,376 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.03376
Opus 5 $0.00016 $0.01688
Sonnet 5 $0.00007 $0.00675
Haiku 4.5 $0.00003 $0.00338

Measured 7d ago against content hash 4576a725b878, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

aws-iam scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

infrastructure/cloud-aws/aws-iam/SKILL.md · 448 lines

How it starts

The opening of the file, as written. The whole thing — 448 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AWS IAM

Manage identity and access in AWS with least-privilege policies, roles, federation, and permission boundaries.

When to Use This Skill

  • Creating roles for EC2 instances, Lambda functions, or ECS tasks
  • Writing custom IAM policies with least-privilege access
  • Setting up OIDC federation for GitHub Actions or other CI/CD systems
  • Implementing permission boundaries for delegated administration
  • Auditing access with IAM Access Analyzer and credential reports
  • Configuring cross-account access with assume-role patterns
  • Enforcing MFA and session policies

Prerequisites

  • AWS CLI v2 installed and configured
  • IAM permissions: iam:* (or scoped to specific actions for least privilege)
  • For OIDC: ability to create identity providers (iam:CreateOpenIDConnectProvider)
  • AWS Organizations access for Service Control Policies (SCPs)

IAM Policy Structure

Every IAM policy follows the same JSON structure. Always specify the minimum actions and resources required.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowS3ReadWrite",
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject",
        "s3:ListBucket"
      ],
      "Resource": [
        "arn:aws:s3:::my-app-bucket",
        "arn:aws:s3:::my-app-bucket/*"
      ],
      "Condition": {
        "StringEquals": {
          "s3:x-amz-server-side-encryption": "aws:kms"
        }
      }
    },
    {
      "Sid": "DenyUnencryptedUploads",
      "Effect": "Deny",
      "Action": "s3:PutObject",
      "Resource": "arn:aws:s3:::my-app-bucket/*",
      "Condition": {
        "StringNotEquals": {
          "s3:x-amz-server-side-encryption": "aws:kms"
        }
      }
    }
  ]
}

Create and Manage Roles

# Create an EC2 instance role with trust policy
aws iam create-role \
  --role-name EC2AppRole \
  --assume-role-policy-document '{
    "Version": "2012-10-17",
    "Statement": [{
      "Effect": "Allow",
      "Principal": {"Service": "ec2.amazonaws.com"},
      "Action": "sts:AssumeRole"
    }]
  }' \
  --tags '[{"Key":"Team","Value":"platform"},{"Key":"Environment","Value":"production"}]'

# Create and attach an inline policy
aws iam put-role-policy \
  --role-name EC2AppRole \
  --policy-name s3-access \
  --policy-document '{
    "Version": "2012-10-17",
    "Statement": [{
      "Effect": "Allow",
      "Action": ["s3:GetObject", "s3:PutObject"],
      "Resource": "arn:aws:s3:::my-app-bucket/*"
    }]
  }'

# Attach a managed policy
aws iam attach-role-policy \
  --role-name EC2AppRole \
  --policy-arn arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy

# Create instance profile and associate the role
aws iam create-instance-profile --instance-profile-name EC2AppProfile
aws iam add-role-to-instance-profile \
  --instance-profile-name EC2AppProfile \
  --role-name EC2AppRole

# Create a Lambda execution role
aws iam create-role \
  --role-name LambdaExecRole \
  --assume-role-policy-document '{
    "Version": "2012-10-17",
    "Statement": [{
      "Effect": "Allow",
      "Principal": {"Service": "lambda.amazonaws.com"},
      "Action": "sts:AssumeRole"
    }]
  }'

aws iam attach-role-policy \
  --role-name LambdaExecRole \
  --policy-arn arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole

Read the full file on GitHub · 448 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 448 lines · 33 tokens per session scan A 4576a725b878

Subscribe to this mod's changes

aws-iam is a skill published in the GitHub repository BagelHole/DevOps-Security-Agent-Skills (1,071 stars, last pushed 3mo ago), licensed MIT. It adds 33 tokens to every session and 3,376 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

implementing-aws-config-rules-for-compliance

Implementing AWS Config rules for continuous compliance monitoring of AWS resources, deploying managed and custom rules aligned to CIS and PCI DSS frameworks, configuring automatic remediation with SSM Automation, and aggregating compliance data across accounts.

adriannoes/awesome-agentic-ai · 53 tokens

implementing-aws-config-rules-for-compliance

Implementing AWS Config rules for continuous compliance monitoring of AWS resources, deploying managed and custom rules aligned to CIS and PCI DSS frameworks, configuring automatic remediation with SSM Automation, and aggregating compliance data across accounts.

xalgorix/xalgorix · 53 tokens

bazel-build-optimization

Optimize Bazel builds for large-scale monorepos. Use when configuring Bazel, implementing remote execution, or optimizing build performance for enterprise codebases.

wshobson/agents · 36 tokens

iam

AWS Identity and Access Management for users, roles, policies, and permissions. Use when creating IAM policies, configuring cross-account access, setting up service roles, troubleshooting permission errors, or managing access control.

itsmostafa/aws-agent-skills · 42 tokens

nw-platform-engineering-foundations

Foundational platform engineering knowledge from key references -- Continuous Delivery, SRE, Accelerate, Team Topologies, Chaos Engineering, and Secure Delivery. Load when contextual grounding in platform engineering theory is needed.

nWave-ai/nWave · 47 tokens

dynamodb

Use when modeling or operating a DynamoDB table: deriving partition/sort keys from access patterns, single-table vs table-per-entity, adding a GSI/LSI, on-demand vs provisioned capacity, or diagnosing hot-partition throttling. NOT relational schema/SQL/EXPLAIN (that is postgresdb), NOT aggregation-pipeline document…

ericrisco/rsc-harness · 82 tokens