xarchitecture
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
AWS integration for credentials, services, and IAM testing with moto mocking
How it fires
How this command gets triggered: by you, by Claude, or both.
/xawsContext preview
What this command does when you run it.
AWS integration for credentials, services, and IAM testing with moto mocking
description: AWS integration for credentials, services, and IAM testing with moto mocking tags: [aws, cloud, testing, security]
Manage AWS services integration and testing based on the arguments provided in $ARGUMENTS.
First, check if this is a Python project and if AWS dependencies are available: !ls -la | grep -E "(requirements.txt|pyproject.toml|setup.py)" !pip list | grep -E "(boto3|moto|pytest)" 2>/dev/null || echo "Missing AWS dependencies"
Based on $ARGUMENTS, perform the appropriate AWS operation:
If checking credentials (--credentials): !aws configure list 2>/dev/null || echo "AWS CLI not configured" !aws sts get-caller-identity 2>/dev/null || echo "Invalid credentials or no access"
If setting up profiles (--profiles): !aws configure list-profiles 2>/dev/null Show available AWS profiles and guide user through profile setup if needed.
If setting up mocking (--mock, --mock-setup): !pip install moto[all] boto3 pytest 2>/dev/null || echo "Install required: pip install moto[all] boto3 pytest"
Create mock environment setup:
# Mock AWS services for testing
import boto3
from moto import mock_s3, mock_iam, mock_lambda
@mock_s3
def test_s3_operations():
s3 = boto3.client('s3', region_name='us-east-1')
# Add test implementationsIf testing IAM (--test-iam, --test-policies): !python -c "import boto3; print('Testing IAM policy simulation...')"
Validate IAM policies and permissions:
For S3 operations (--s3): !aws s3 ls 2>/dev/null || echo "S3 access denied or not configured"
For Lambda operations (--lambda): !aws lambda list-functions --max-items 5 2>/dev/null || echo "Lambda access denied"
For DynamoDB operations (--dynamodb): !aws dynamodb list-tables 2>/dev/null || echo "DynamoDB access denied"
If running security scan (--security-scan): !pip install checkov 2>/dev/null !checkov -f terraform/ --framework terraform 2>/dev/null || echo "No Terraform files found"
Scan for:
Think step by step about AWS best practices and security considerations.
For integration testing (--integration-test): !python -m pytest tests/test_aws*.py -v 2>/dev/null || echo "No AWS tests found"
Provide specific recommendations based on findings:
If no specific operation is provided, guide the user through AWS setup and suggest next steps.
Transform Claude Code into a complete development platform with 45 AI-powered commands that automate your entire software development workflow. Now with improved git identity management!
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Manage project configuration files, environment variables, and application settings
Continue an execution plan from where it left off across sessions
Interactive debugging support with error analysis and fix suggestions - integrates with Debug Specialist sub-agent for complex…