aws-iam

Diagnose AWS IAM AccessDenied errors across policy layers.

15|2|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/d-padmanabhan/agent-engineering-handbook --skill aws-iam-d-padmanabhan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-iam
Source: https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/aws-iam
Command: npx skills add https://github.com/d-padmanabhan/agent-engineering-handbook --skill aws-iam-d-padmanabhan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you diagnose and design AWS Identity and Access Management (IAM) authorization so you can resolve AccessDenied issues and implement correct cross-account and KMS authorization controls.

Core Features & Use Cases

  • Cross-account IAM authorization walkthrough: clarifies the relationship between trust policies, permission policies, and required principal access for STS assume-role flows.
  • Organizations SCP and guardrail reasoning: shows how explicit deny from SCPs, permission boundaries, session policies, and identity/resource policies interacts during policy evaluation.
  • KMS key policy, grants, and debugging: explains why IAM kms:* permissions can still fail due to missing key policy permissions or grant constraints, and gives a structured method to isolate the failing layer.

Quick Start

Use the aws-iam skill to troubleshoot an AWS AccessDenied error for an STS assumed-role calling a KMS decrypt action by mapping the failing action/resource to each applicable IAM, resource-policy, boundary, SCP, and KMS layer.

Frequently Asked Questions about aws-iam

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

FAQPage Schema
Why does my AWS IAM role get AccessDenied when assuming a cross-account STS role?

Cross-account AccessDenied errors occur when trust policies, permission policies, or resource-based policies lack the required principal access for STS assume-role flows. This analysis maps the failing action to the exact missing authorization across identity, resource, and session policy layers.

How does an Organizations SCP override AWS IAM permissions during policy evaluation?

An Organizations SCP acts as a guardrail through explicit deny precedence during AWS IAM policy evaluation. If an SCP denies an action, it overrides all identity-based, resource-based, and permission boundary policies, blocking authorization regardless of allowed permissions.

Why does kms:Decrypt return AccessDenied even with IAM kms:* permissions?

AWS IAM kms:* permissions fail when the KMS key policy or grant constraints restrict access. This debugging isolates the failing layer by checking KMS key policies and grants separately from IAM identity-based policies to find the minimum missing authorization.

How do I debug AWS IAM AccessDenied errors across multiple policy layers?

Debug AWS IAM AccessDenied errors by applying an explicit-deny-first analysis across identity-based, resource-based, permission boundary, session policy, SCP, and KMS key policy layers. This isolates the exact principal, action, resource, and policy-layer causing the authorization failure.

What is the best way to design cross-account STS assume-role authorization in AWS?

Design cross-account STS assume-role authorization by mapping the required principal, action, and resource across trust and permission policies. This ensures correct AWS IAM access by validating both the trusting and trusting account policy relationships.

When do permission boundaries override AWS IAM identity-based policies?

Permission boundaries override AWS IAM identity-based policies when the boundary restricts actions that the identity policy allows. The effective permissions are the intersection of the boundary and identity policy, combined with explicit deny checks from SCPs and resource policies.