aws-iam

Configure AWS IAM roles, policies, and OIDC federation with least-privilege permissions.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/ToanPV90/dotfiles --skill aws-iam-toanpv90
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-iam
Source: https://github.com/ToanPV90/dotfiles/tree/main/agents/.agents/skills/aws-iam
Command: npx skills add https://github.com/ToanPV90/dotfiles --skill aws-iam-toanpv90

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

aws-iam helps prevent over-permissioned AWS identities by guiding you to design, implement, and validate secure IAM users, roles, policies, and federation with least-privilege and strong guardrails.

Core Features & Use Cases

  • IAM role and policy authoring: Build trust policies for EC2, Lambda, and ECS tasks and attach least-privilege permissions using inline or managed policies.
  • Secure cross-account and OIDC federation: Configure assume-role patterns with ExternalId and set up GitHub Actions (OIDC) trust for short-lived access without static keys.
  • Governance, auditing, and guardrails: Apply permission boundaries, analyze access with IAM Access Analyzer, generate credential reports, and troubleshoot common policy/trust failures.

Quick Start

Use the aws-iam skill to generate the trust policy and role permissions for a GitHub Actions OIDC deployment into a specified AWS role.

Frequently Asked Questions about aws-iam

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up GitHub Actions OIDC federation to assume an AWS IAM role without static keys?

GitHub Actions OIDC federation replaces static AWS keys by configuring an IAM role trust policy for the GitHub OIDC provider, allowing short-lived credential assumption via AssumeRoleWithWebIdentity. You define the trust relationship, attach least-privilege permissions, and validate the setup using IAM Access Analyzer.

What is the best way to apply least-privilege permissions when creating IAM roles for Lambda and ECS?

Least-privilege IAM roles for Lambda and ECS are created by scoping Action and Resource elements explicitly in inline or managed policies. You restrict permissions to only required service actions, attach permission boundaries as guardrails, and verify no unintended access exists through IAM Access Analyzer policy simulation.

How does cross-account access work with ExternalId in an AWS IAM trust policy?

Cross-account access uses an IAM trust policy granting another account permission to assume a role, secured with an ExternalId condition key. This prevents confused deputy problems by requiring the assuming account to provide the unique ExternalId token during the assume-role request for identity verification.

Can I validate IAM permission boundaries and troubleshoot policy trust failures using IAM Access Analyzer?

IAM Access Analyzer validates permission boundaries and policy trust failures by generating findings on resources accessible from outside the zone of trust. You run policy simulations to test effective permissions, review credential reports for active keys, and identify over-permissioned resource-scoped policies.

Why does my AssumeRoleWithWebIdentity setup fail when deploying from CI/CD pipelines?

AssumeRoleWithWebIdentity in CI/CD pipelines fails when the IAM trust policy conditions do not match the OIDC token claims, such as incorrect repository or branch mappings. You resolve this by aligning the role trust policy string conditions with the exact GitHub Actions workflow OIDC provider configuration.