executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
aws-iamImplements AWS Identity and Access Management (IAM) for securely managing users, groups, roles, and permissions in the AWS ecosystem.
Independent GitHub snapshot · Automated classification · Original documentation governs
name: aws-iam description: Implements AWS Identity and Access Management (IAM) for securely managing users, groups, roles, and permissions in the AWS ecosystem. license: MIT compatibility: opencode metadata: version: "1.1.1" domain: cloud triggers: aws iam, identity management, access control, permissions, user management archetypes: [implementation, access management] anti_triggers: [overly permissive policies] response_profile: verbosity: medium directive_strength: high abstraction_level: operational
role: implementation scope: implementation output-format: code
AWS Identity and Access Management (IAM) enables organizations to manage access and user identities effectively. Here’s an in-depth exploration of its features and best practices:
import json
import boto3
from botocore.exceptions import ClientError
# Create IAM client
client = boto3.client('iam')
# Function to create a new IAM user
def create_user(user_name):
try:
client.create_user(UserName=user_name)
print(f"User '{user_name}' created successfully.")
except ClientError as e:
print(f"Error creating user: {e}")
# Function to attach a policy to the user
def attach_policy(user_name, policy_arn):
try:
client.attach_user_policy(
UserName=user_name,
PolicyArn=policy_arn
)
print(f"Policy '{policy_arn}' attached to user '{user_name}'.")
except ClientError as e:
print(f"Error attaching policy: {e}")
# Create user and assign permissions
user_name = 'NewUser'
create_user(user_name)
attach_policy(user_name, 'arn:aws:iam::aws:policy/ReadOnlyAccess')
Authoritative documentation links for this skill's domain. The model follows markdown links at load time to resolve external references and inline content.