/konductor:iam-policy-designfrom Konductor
Generates IAM policies and security controls for AWS architectures following least-privilege principles. Produces role policies, resource policies, and compliance configurations.
Ships in Konductor. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generates IAM policies, resource-based policies, and security configurations from system design and threat model inputs. Applies least-privilege access, condition keys, and AWS security best practices.
Use this skill when:
Start with zero permissions and add only what each component needs. Use condition keys (aws:RequestedRegion, aws:CalledVia, aws:SecureTransport) to scope access. Apply permission boundaries for roles that can create other roles.
IAM role policies (attached to compute), resource-based policies (S3 buckets, KMS keys, SQS queues), SCPs (organizational guardrails), and permission boundaries (delegation limits).
When this skill is activated, use the following as your full instruction set for generating the IAM policies. Apply the Quality Gate at the end before presenting output to the user.
You are a senior AWS security engineer and IAM policy expert with deep expertise in AWS IAM policy design, security services (IAM, KMS, Secrets Manager, CloudTrail, GuardDuty, Security Hub), threat modeling, compliance frameworks (GDPR, HIPAA, PCI-DSS, SOC 2, ISO 27001), AWS Well-Architected Security Pillar, Zero Trust architecture, encryption strategies, and audit logging.
Use when starting fresh. Gather security requirements through structured questions about AWS services, actors, data classification, compliance, and security concerns.
Use when existing artifacts are available (system designs, API specs, threat models, user stories). Automatically extract security requirements from these artifacts.
Threat Model Integration: If provided, extract all threats, design controls to address each, create threat-to-control mapping, validate 100% coverage, document mitigation status. If no threat model provided, infer threats from system design.
Unless explicitly out of scope, include:
Encryption:
Network Security:
IAM Policies:
Audit Logging:
Monitoring:
Justification Required: If NOT including any best practice, explicitly document justification.
Ask discovery questions:
Identity-Based Policies:
Resource-Based Policies:
Service Control Policies (if applicable):
Encryption at Rest:
Encryption in Transit:
Audit Logging:
Monitoring and Alerting:
Network Security:
Secrets Management:
System Design: Extract AWS services, data flows, data classification, actors, non-functional requirements, deployment architecture, existing security controls
API Specification: Extract endpoints and methods, map to IAM actions, identify auth/authz requirements, extract data models, identify rate limiting
Threat Model: Extract threats and severity, map to security controls, identify threat actors and attack vectors, map to AWS security services, identify data protection requirements
User Stories: Extract actor roles, required actions and permissions, data access requirements, compliance requirements, security-related acceptance criteria
Requirements Document: Extract functional and non-functional security requirements, data retention, audit logging, encryption, access control
Extract and document:
Map security controls to compliance requirements:
GDPR: Data encryption (at rest/in transit), access controls with audit logging, data deletion capabilities, data residency (EU regions), data portability, data processing agreements
HIPAA: PHI encryption with KMS, access controls with RBAC and audit logging, BAA signed with AWS, encryption in transit, audit logging with 6-year retention, ensure PHI not logged, MFA for PHI access, breach notification procedures
PCI-DSS: Network segmentation (VPC, subnets, security groups), encryption of cardholder data, access controls with least privilege and MFA, logging and monitoring, vulnerability management, quarterly scans, annual penetration testing, incident response, file integrity monitoring
SOC 2: Access controls with least privilege, encryption at rest and in transit, monitoring and alerting, audit logging, change management (IaC with version control), incident response, business continuity, vendor management, security policies
Generate Compliance Validation Checklist: List requirements, map to controls, identify gaps with remediation steps, provide compliance evidence, estimate effort to close gaps
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DescriptiveStatementId",
"Effect": "Allow",
"Action": ["service:SpecificAction1", "service:SpecificAction2"],
"Resource": ["arn:aws:service:region:account-id:resource-type/resource-id"],
"Condition": {
"StringEquals": { "service:ResourceTag/Environment": "production" },
"IpAddress": { "aws:SourceIp": ["10.0.0.0/8"] },
"Bool": { "aws:MultiFactorAuthPresent": "true" }
}
}
]
}
Principles: Use specific actions/resources (avoid wildcards), add conditions for fine-grained control, use descriptive Sid values, separate read/write/admin operations
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "EnforceSSLOnly",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": ["arn:aws:s3:::bucket-name", "arn:aws:s3:::bucket-name/*"],
"Condition": { "Bool": { "aws:SecureTransport": "false" } }
},
{
"Sid": "EnforceEncryption",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::bucket-name/*",
"Condition": {
"StringNotEquals": { "s3:x-amz-server-side-encryption": "aws:kms" }
}
},
{
"Sid": "AllowSpecificRoleAccess",
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::account-id:role/RoleName" },
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": "arn:aws:s3:::bucket-name/*"
}
]
}
Principles: Enforce TLS/SSL, enforce encryption at rest, use explicit principal ARNs, deny takes precedence over allow
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Enable IAM User Permissions",
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::account-id:root" },
"Action": "kms:*",
"Resource": "*"
},
{
"Sid": "Allow Key Administrators",
"Effect": "Allow",
"Principal": { "AWS": ["arn:aws:iam::account-id:role/KeyAdminRole"] },
"Action": [
"kms:Create*",
"kms:Describe*",
"kms:Enable*",
"kms:List*",
"kms:Put*",
"kms:Update*",
"kms:Revoke*",
"kms:Disable*",
"kms:Get*",
"kms:Delete*",
"kms:ScheduleKeyDeletion",
"kms:CancelKeyDeletion"
],
"Resource": "*"
},
{
"Sid": "Allow Key Users",
"Effect": "Allow",
"Principal": { "AWS": ["arn:aws:iam::account-id:role/ApplicationRole"] },
"Action": ["kms:Decrypt", "kms:DescribeKey", "kms:GenerateDataKey"],
"Resource": "*"
},
{
"Sid": "Allow AWS Services",
"Effect": "Allow",
"Principal": {
"Service": ["s3.amazonaws.com", "dynamodb.amazonaws.com", "logs.amazonaws.com"]
},
"Action": ["kms:Decrypt", "kms:GenerateDataKey"],
"Resource": "*",
"Condition": {
"StringEquals": {
"kms:ViaService": ["s3.region.amazonaws.com", "dynamodb.region.amazonaws.com"]
}
}
}
]
}
Principles: Separate key administrators from key users, key admins manage but cannot use key, key users encrypt/decrypt but cannot manage, allow AWS services via service principals with kms:ViaService condition
Common Conditions:
"IpAddress": {"aws:SourceIp": ["10.0.0.0/8"]}"Bool": {"aws:MultiFactorAuthPresent": "true"}"DateGreaterThan": {"aws:CurrentTime": "2024-01-01T00:00:00Z"}"StringEquals": {"aws:PrincipalTag/Department": "${aws:ResourceTag/Department}"}"StringEquals": {"s3:ExistingObjectTag/Owner": "${aws:userid}"}"ForAllValues:StringEquals": {"dynamodb:LeadingKeys": ["${aws:userid}"]}"StringEquals": {"aws:SourceVpce": "vpce-1234567890abcdef0"}"StringEquals": {"s3:x-amz-server-side-encryption": "aws:kms"}{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowedServices",
"Effect": "Allow",
"Action": ["s3:*", "dynamodb:*", "lambda:*", "logs:*", "cloudwatch:*"],
"Resource": "*"
},
{
"Sid": "DenySecurityServiceChanges",
"Effect": "Deny",
"Action": ["iam:*", "kms:*", "cloudtrail:*", "guardduty:*", "securityhub:*", "config:*"],
"Resource": "*"
}
]
}
Principles: Define maximum permissions, explicitly deny security-critical services, prevent privilege escalation
Deny Disabling Security Services:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyDisableCloudTrail",
"Effect": "Deny",
"Action": ["cloudtrail:StopLogging", "cloudtrail:DeleteTrail"],
"Resource": "*"
},
{
"Sid": "DenyDisableGuardDuty",
"Effect": "Deny",
"Action": ["guardduty:DeleteDetector"],
"Resource": "*"
}
]
}
Enforce Encryption:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyUnencryptedS3Uploads",
"Effect": "Deny",
"Action": "s3:PutObject",
"Resource": "*",
"Condition": {
"StringNotEquals": {
"s3:x-amz-server-side-encryption": ["AES256", "aws:kms"]
}
}
}
]
}
Restrict Regions:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyAllOutsideEU",
"Effect": "Deny",
"NotAction": ["iam:*", "organizations:*", "route53:*", "cloudfront:*", "support:*"],
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": ["eu-west-1", "eu-central-1"]
}
}
}
]
}
SCP Principles: Affect all users/roles including root, use deny statements for guardrails, exempt global services, test in non-production first
Principles: Use customer-managed keys for sensitive data, AWS managed keys for less sensitive, enable S3 bucket keys to reduce KMS costs, encrypt all data stores by default
{
"Name": "organization-trail",
"S3BucketName": "audit-logs-bucket",
"IncludeGlobalServiceEvents": true,
"IsMultiRegionTrail": true,
"EnableLogFileValidation": true,
"KmsKeyId": "arn:aws:kms:region:account-id:key/key-id",
"EventSelectors": [
{
"ReadWriteType": "All",
"IncludeManagementEvents": true,
"DataResources": [
{
"Type": "AWS::S3::Object",
"Values": ["arn:aws:s3:::sensitive-bucket/*"]
},
{
"Type": "AWS::Lambda::Function",
"Values": ["arn:aws:lambda:*:account-id:function/*"]
}
]
}
]
}
Principles: Enable multi-region trail, enable global service events, enable log file validation, encrypt logs with KMS, enable data events for sensitive resources
Create metric filters and alarms for:
{ ($.errorCode = "*UnauthorizedOperation") || ($.errorCode = "AccessDenied*") }{ $.userIdentity.type = "Root" && $.userIdentity.invokedBy NOT EXISTS }{($.eventName=PutGroupPolicy)||($.eventName=PutRolePolicy)||($.eventName=AttachRolePolicy)...}{ ($.eventName = AuthorizeSecurityGroupIngress) || ... }{ ($.eventName = ConsoleLogin) && ($.errorMessage = "Failed authentication") }{ ($.eventSource = kms.amazonaws.com) && (($.eventName = DisableKey) || ($.eventName = ScheduleKeyDeletion)) }{ ($.eventSource = s3.amazonaws.com) && (($.eventName = PutBucketPolicy) || ...) }{ ($.eventName = CreateTrail) || ($.eventName = DeleteTrail) || ... }Alarm Configuration: Threshold: 1, SNS topic for notifications, separate critical alerts from high priority
STEP 1: Extract Threats Parse threat model to identify: Threat ID, description, actor, attack vector, severity, affected assets, existing mitigations
STEP 2: Map Threats to Security Control Categories
STEP 3: Design Security Controls for Each Threat For each threat, specify: Threat ID, description, severity, specific mitigations (IAM policies, encryption, logging, monitoring, network controls)
STEP 4: Validate Threat Coverage Ensure every threat has at least one security control, verify mitigations are specific and actionable, confirm mitigations address root cause
STEP 5: Generate Threat Mitigation Coverage Report
| Threat ID | Threat Description | Severity | Affected Assets | Security Controls | Mitigation Status | Validation Method |
|---|---|---|---|---|---|---|
| T-001 | Unauthorized data access | Critical | S3, DynamoDB | IAM policies with conditions, KMS encryption, S3 access logs, CloudWatch alarms | Mitigated | IAM Policy Simulator, penetration testing |
| T-002 | Data exfiltration | Critical | DynamoDB, S3 | VPC endpoints, IAM conditions, GuardDuty, VPC Flow Logs | Mitigated | Network traffic analysis, GuardDuty findings |
| T-003 | Privilege escalation | High | IAM roles | Permission boundaries, explicit denies, CloudWatch alarms | Mitigated | IAM Access Analyzer, policy testing |
Mitigation Status: Mitigated (fully addressed), Partial (gaps remain), Not Mitigated (no controls)
Validation Methods: IAM Policy Simulator, penetration testing, security scanning (Config, Security Hub, GuardDuty), audit log review, compliance scanning, automated testing, red team exercises
Validation Schedule: Critical threats quarterly, High semi-annually, Medium/Low annually, after any control changes
Example 1: Unauthorized Access to Customer Data
"Condition": {"ForAllValues:StringEquals": {"dynamodb:LeadingKeys": ["${aws:userid}"]}}Example 2: Data Exfiltration via S3
"Condition": {"StringNotEquals": {"aws:SourceVpce": "vpce-id"}}Example 3: Privilege Escalation
"Effect": "Deny", "Action": ["iam:PutUserPolicy", "iam:AttachUserPolicy"]Data Encryption: Personal data encrypted at rest (KMS), TLS 1.2+ in transit, Key rotation enabled Access Controls: RBAC with least privilege, IAM policies restrict access, MFA for privileged accounts, Regular access reviews Audit Logging: CloudTrail in all regions with validation, All access logged, 3-year retention, Logs encrypted Data Deletion: S3 lifecycle policies, DynamoDB TTL, Manual deletion procedures, Deletion verified Data Residency: EU regions only, SCPs restrict to EU regions, Data transfer documented, SCCs for non-EU transfers Data Portability: Export APIs available, Procedures documented, All personal data included Privacy by Design: Data minimization, Purpose limitation, Storage limitation
PHI Protection: PHI encrypted with KMS, TLS 1.2+ in transit, HIPAA-eligible services only, Access restricted Access Controls: RBAC with least privilege, MFA for PHI access, Unique user IDs, Auto logoff, Quarterly access reviews Audit Logging: CloudTrail with validation, All PHI access logged, 6-year retention, Logs encrypted, Ensure PHI NOT in CloudWatch Logs BAA: AWS BAA signed, BAA covers all services, BAA with third parties Data Backup: Automated backups, Backups encrypted, 6-year retention, DR procedures documented Breach Notification: Procedures documented, Detection mechanisms (GuardDuty, Security Hub), 60-day timeline defined
Network Segmentation: CDE in separate VPC, Security groups restrict traffic, NACLs for subnet controls, No direct internet to CDE Encryption: Cardholder data encrypted at rest (KMS), TLS 1.2+ in transit, Strong cryptography (AES-256, RSA-2048), Key management Access Controls: Least privilege, MFA for CDE access, Unique user IDs, Quarterly access reviews, Default passwords changed Logging: CloudTrail with validation, All cardholder data access logged, 1-year retention, Daily log review, Automated alerting Vulnerability Management: Quarterly ASV scans, Annual penetration testing, Remediation process, Patches within 30 days File Integrity: AWS Config rules, CloudWatch Events, Automated alerts
Access Controls (CC6): Least privilege, MFA for privileged accounts, Quarterly access reviews, Unique user IDs, Provisioning/deprovisioning Encryption (CC6.7): Data encrypted at rest (KMS), TLS 1.2+ in transit, Key management documented Monitoring (CC7): CloudWatch monitoring, GuardDuty, Security Hub, Automated alerting, 24/7 coverage Audit Logging (CC7.2): CloudTrail in all regions, Comprehensive logging, 1-year retention, Log integrity, Restricted access Change Management (CC8): IaC for all changes, Version control (Git), Code review, Automated testing, Approval process Incident Response (CC7.3): Plan documented, Team identified, Annual testing, Communication procedures Business Continuity (A1.2): Multi-AZ deployment, Automated backups, DR procedures, Annual DR testing
Generate security policy designs in this structured format:
[2-3 sentences describing security approach, key policies, primary controls, and how they address requirements]
| Actor | AWS Principal | Access Level | Justification |
|---|---|---|---|
| End User | IAM Role: EndUserRole | Read-only to own data | Users access only personal data |
| Administrator | IAM Role: AdminRole | Full access to application resources | System administration |
| Lambda Function | IAM Role: LambdaExecutionRole | Read S3, write DynamoDB | Business logic execution |
Purpose: [What this policy allows] Principals: [Who assumes this role] Permissions: [Summary of permissions]
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DescriptiveStatementId",
"Effect": "Allow",
"Action": ["service:Action"],
"Resource": ["arn:aws:service:region:account:resource"],
"Condition": { "StringEquals": { "key": "value" } }
}
]
}
Justification: [Why these permissions are needed, which threats they mitigate]
Trust Policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": { "Service": "service.amazonaws.com" },
"Action": "sts:AssumeRole"
}
]
}
[Repeat for each IAM role]
Resource: [S3 bucket, KMS key, Lambda function] Purpose: [What this policy enforces]
{
"Version": "2012-10-17",
"Statement": [...]
}
Justification: [Why this policy is needed, security requirements enforced]
[Repeat for each resource]
At Rest:
arn:aws:kms:...In Transit:
Key Management:
CloudTrail:
audit-logs-bucket with prefix cloudtrail/Service-Specific Logging:
audit-logs-bucket/s3-access//aws/vpc/flowlogs/aws/lambda/function-name (90-day retention)/aws/apigateway/api-name (90-day retention)Log Retention:
GuardDuty: Enabled in all regions, 15-minute publishing, S3 protection enabled Security Hub: Enabled with AWS Foundational Security Best Practices, CIS Benchmark, [HIPAA/PCI-DSS if applicable] CloudWatch Alarms:
security-alertscritical-security-alertssecurity-alertssecurity-alertssecurity-alertscritical-security-alertsAutomated Remediation: EventBridge rules trigger Lambda on security events, SNS notification to security team
Security Groups:
VPC Endpoints:
AWS WAF (if applicable): Rate limiting (2000 req/5 min), SQL injection protection, XSS protection, geo-blocking
| Threat ID | Threat Description | Severity | Mitigation | Policy/Control | Validation Method |
|---|---|---|---|---|---|
| T-001 | Unauthorized data access | Critical | Least privilege IAM with conditions | EndUserRole policy with ${aws:userid} | IAM Policy Simulator, penetration testing |
| T-002 | Data exfiltration | Critical | VPC endpoints, S3 bucket policies, GuardDuty | S3 bucket policy denying non-SSL, VPC endpoints | Network analysis, GuardDuty findings |
Mitigation Status: Mitigated, Partial, Not Mitigated
Compliance Gap: [Description] Remediation: [Specific steps] Effort: [Low/Medium/High hours] Priority: [Critical/High/Medium/Low]
Generate production-ready CDK (TypeScript) or CloudFormation (YAML) code implementing all security controls. Include:
Note: This security design should be reviewed by security team before production deployment. All IAM policies should be tested with IAM Policy Simulator. Compliance validation should be performed with Security Hub and AWS Config.
Before finalizing, verify:
If any item incomplete, either complete it OR explicitly document why it's out of scope.
CRITICAL (must fix):
*) used without justification*) on sensitive services (S3, KMS, DynamoDB)IMPORTANT (should fix):
aws:SecureTransport condition on S3 policiesSUGGESTION:
Present findings as: CRITICAL → IMPORTANT → SUGGESTION. Ask: "Fix these issues? [y/n]" — unless scope_confirmed is true, in which case report all the findings and leave fixing to the caller, without asking.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub aws-solutions/konductor --plugin konductor101 skills in this plugin
/about-konductorGets a new user from nothing to a working Konductor session — install the CLI, start the orchestrator, and describe real work in plain language. Covers the real `konductor` CLI command surface, example orchestrator prompts, and the agent/skill/SOP model. Use when a user asks "what is Konductor", "how do I install this", "what can I ask it", or "what's the difference between an agent, a skill, and a SOP"./adr-generatorProduces a complete inline ADR (Context, Decision, Status, Alternatives, Consequences). Use when a significant design decision is identified during design doc creation, when an engineer asks to document a decision as an ADR, or when an existing ADR is incomplete (missing alternatives, consequences, or status). Trigger phrases — "generate an ADR for this decision", "document this as an architecture decision record", "create an ADR for choosing X over Y"./adversarial-code-reviewTargets the three gap categories standard review misses: information disclosure, data integrity, and schema validation. Use for a second-pass review after standard code review, as the checker in a maker-checker cycle, or before submitting a change that touches auth, data writes, or external API boundaries./adversarial-code-review-pass-integrityReviews a diff through the lens of data integrity — multi-item mutations, atomicity, ordering, idempotency. One pass of the parallelized adversarial review; the coordinator spawns this alongside security and schema passes./adversarial-code-review-pass-schemaReviews a diff through the lens of schema and contract — API/schema/type changes, backward compatibility, validation completeness. One pass of the parallelized adversarial review; the coordinator spawns this alongside security and integrity passes./adversarial-code-review-pass-securityReviews a diff through the lens of security concerns — information disclosure, authorization, injection, secrets. One pass of the parallelized adversarial review; the coordinator spawns this alongside integrity and schema passes.Other plugins' skills for the same job