Configure AWS IAM users, roles, policies, and identity federation
Creates and manages AWS IAM users, roles, policies, and identity federation with proper security configurations. Triggers when you need to set up AWS access control, provision identities, or configure trust relationships for AWS resources.
/plugin marketplace add pluginagentmarketplace/custom-plugin-aws/plugin install pluginagentmarketplace-aws-cloud-assistant@pluginagentmarketplace/custom-plugin-awsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/config.yamlassets/iam-policies.yamlassets/schema.jsonreferences/GUIDE.mdreferences/PATTERNS.mdscripts/validate.pyConfigure secure identity and access management for AWS resources.
| Attribute | Value |
|---|---|
| AWS Service | IAM |
| Complexity | Medium |
| Est. Time | 15-30 min |
| Prerequisites | AWS account, admin access |
| Parameter | Type | Description | Validation |
|---|---|---|---|
| entity_type | string | user, role, group, policy | enum |
| entity_name | string | Name for the entity | ^[a-zA-Z0-9+=,.@_-]{1,64}$ |
| action | string | create, update, delete, attach | enum |
| Parameter | Type | Default | Description |
|---|---|---|---|
| path | string | / | IAM path for organization |
| max_session_duration | int | 3600 | Role session duration (seconds) |
| permissions_boundary | string | null | ARN of permissions boundary |
| tags | object | {} | Resource tags |
# Create user with console access
aws iam create-user --user-name $USERNAME --path /developers/
# Create access keys
aws iam create-access-key --user-name $USERNAME
# Attach managed policy
aws iam attach-user-policy \
--user-name $USERNAME \
--policy-arn arn:aws:iam::aws:policy/PowerUserAccess
# Create role with trust policy
aws iam create-role \
--role-name $ROLE_NAME \
--assume-role-policy-document file://trust-policy.json \
--max-session-duration 7200
# Attach policy
aws iam attach-role-policy \
--role-name $ROLE_NAME \
--policy-arn arn:aws:iam::aws:policy/ReadOnlyAccess
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {"Service": "ec2.amazonaws.com"},
"Action": "sts:AssumeRole"
}
]
}
def iam_operation_with_retry(operation, max_retries=3):
for attempt in range(max_retries):
try:
return operation()
except iam.exceptions.LimitExceededException:
time.sleep(2 ** attempt)
raise Exception("Max retries exceeded")
| Symptom | Cause | Solution |
|---|---|---|
| EntityAlreadyExists | Duplicate name | Use unique name or update |
| MalformedPolicyDocument | Invalid JSON | Validate policy syntax |
| LimitExceeded | Too many entities | Delete unused or request increase |
def test_iam_role_creation():
# Arrange
role_name = "test-role-" + str(uuid.uuid4())[:8]
# Act
role = create_iam_role(role_name, trust_policy)
# Assert
assert role["Arn"].endswith(role_name)
# Cleanup
delete_iam_role(role_name)
assets/iam-policies.yaml - Common policy templatesThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.