AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a systematic diagnostic framework for resolving common operational issues within AWS Clean Rooms. It guides users through identifying and debugging permission failures, access errors, and CloudWatch logging issues related to custom ML model training and inference jobs. The skill covers the inspection of IAM roles, S3 bucket policies, KMS keys, Lake Formation permissions, and Clean Rooms ML configurations to pinpoint root causes.
What it does
- Diagnoses permission and access errors for Clean Rooms collaborations.
- Troubleshoots CloudWatch log publishing failures for ML training and inference jobs.
- Validates IAM role trust policies and attached permissions.
- Inspects S3 bucket and KMS key policies for data access issues.
- Verifies Lake Formation permissions for Glue-backed tables.
- Checks ML configuration and privacy settings for custom model associations.
When to use it
- When a user encounters 'Access Denied' or permission errors in Clean Rooms.
- When custom ML model jobs fail to publish logs to CloudWatch.
- When troubleshooting cross-account data access or result writing failures.
- When verifying if an IAM role has the necessary permissions for Clean Rooms operations.
Advantages
- Provides a structured, step-by-step approach to complex AWS permission debugging.
- Reduces manual effort in identifying misconfigured ML logging associations.
- Ensures all relevant policy types (IAM, S3, KMS, Lake Formation) are checked.
- Helps resolve cross-service configuration issues efficiently.
Usage examples
- “I am getting an access denied error when running a protected query in my Clean Rooms membership.”
- The agent will initiate the permission debugging workflow, asking for the membership ID and error message to trace the failure back to the specific IAM role or bucket policy.
- “My custom ML model training job in Clean Rooms is not showing any logs in CloudWatch.”
- The agent will trigger the logging diagnostic procedure, checking the ML configuration, privacy policies, and the IAM role permissions for CloudWatch log group access.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/aws/aws-cleanrooms/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip aws-cleanrooms.zip -d .agents/skills
Documentation by AWS
AWS Clean Rooms
Overview
Domain expertise for troubleshooting AWS Clean Rooms collaborations and custom ML modeling. Covers permission debugging, data access issues, and CloudWatch logging configuration.
Common tasks
Debugging Clean Rooms errors
Determine the failure type:
Access denied or permission error? → See permission debugging procedure. Covers IAM role policies (inline + attached managed), S3 bucket policies, KMS key policies, Lake Formation permissions, and cross-account trust.
Missing CloudWatch logs for custom model jobs? → See custom model logging debugging procedure. Covers Configured Model Algorithm Association privacy configuration, ML Configuration role permissions, and log group verification.
Additional resources
Files
- ATTRIBUTION.mdAdded by AutoGineer917 B
- LICENSELicence file added by AutoGineer9.9 KiB
- NOTICELicence file added by AutoGineer67 B
- SKILL.md1.7 KiB
- references/custom-model-logging-debugging.md5.9 KiB
- references/permission-debugging.md9.3 KiB
references/permission-debugging.md
Clean Rooms Permission Debugging
Systematic diagnostic procedure for permission and access errors in AWS Clean Rooms.
Parameters
error_message (required): The exact error message or description of the permission failure
membership_id (required): The Clean Rooms membership ID. If the user only has a collaboration ID, resolve it using
aws cleanrooms list-memberships --status ACTIVE --region ${region}and filter bycollaborationId.collaboration_id (optional): The Clean Rooms collaboration ID
region (required): The AWS region
You MUST ask for all required parameters upfront. You MUST NOT block on optional parameters.
Steps
1. Validate AWS Credentials and Region
aws sts get-caller-identityInform the user about the AWS account and region being used
2. Identify the Error Context
Classify the error: result writing failure (result receiver role), data access failure (data access service role), table association failure, or cross-account failure.
aws cleanrooms get-membership --membership-identifier ${membership_id} --region ${region}If
collaboration_idwas not provided, extract it from the get-membership responseaws cleanrooms get-collaboration --collaboration-identifier ${collaboration_id} --region ${region}If the error involves a protected query:
aws cleanrooms list-protected-queries --membership-identifier ${membership_id} --status FAILED --region ${region}Extract
protectedQueryId. If multiple, ask the user to confirm.aws cleanrooms get-protected-query --membership-identifier ${membership_id} --protected-query-identifier ${query_id} --region ${region}
For result writing failures, extract the output S3 bucket and result receiver role ARN from
defaultResultConfigurationin the get-membership response. If a protected query is involved, also check itsoutputConfigurationas it may override the membership default.For data access failures involving configured tables (not ID mapping tables or training datasets), resolve to the underlying S3 bucket:
aws cleanrooms list-configured-table-associations --membership-identifier ${membership_id} --region ${region}Extract
configuredTableAssociationIdentifier. If multiple, ask the user to confirm.aws cleanrooms get-configured-table-association --membership-identifier ${membership_id} --configured-table-association-identifier ${association_id} --region ${region}Extract
configuredTableIdentifierand the service role ARN.aws cleanrooms get-configured-table --configured-table-identifier ${configured_table_id} --region ${region}Extract
databaseNameandtableNamefromtableReference.glue.aws glue get-table --database-name ${database_name} --name ${table_name} --region ${region}Extract S3 bucket from
Table.StorageDescriptor.Location
For non-Glue/S3 data sources (Snowflake, Redshift), the permission model differs — ask the user for the data source type and use
search_documentationfor that source's access requirements.You MUST NOT fix permissions before completing the full diagnostic chain.
3. Check IAM Role Policies
Extract
role_namefrom the role ARN (segment after the last/). Retain the full ARN asrole_arnfor policy resource checks.aws iam get-role --role-name ${role_name}aws iam list-role-policies --role-name ${role_name}aws iam list-attached-role-policies --role-name ${role_name}For each inline policy:
aws iam get-role-policy --role-name ${role_name} --policy-name ${policy_name}For each attached managed policy:
aws iam get-policy --policy-arn ${policy_arn}thenaws iam get-policy-version --policy-arn ${policy_arn} --version-id ${version_id}Verify trust policy allows
cleanrooms.amazonaws.comFor Glue/S3-backed configured tables, data access roles need:
glue:GetDatabase,glue:GetTable,glue:GetPartitions,glue:BatchGetPartition,glue:GetSchema,glue:GetSchemaVersion,s3:GetObject,s3:GetBucketLocation,s3:ListBucket. For other data source types, usesearch_documentationfor current requirements.Result receiver roles need:
s3:PutObject,s3:GetBucketLocation,s3:ListBucketFor AccessDenied on a Clean Rooms API call, also verify the caller has all dependent actions — even if they have the primary permission (e.g.,
cleanrooms:StartProtectedQuery):StartProtectedQuery:cleanrooms:GetCollaborationAnalysisTemplate,cleanrooms:GetSchema,s3:GetBucketLocation,s3:ListBucket,s3:PutObjectStartProtectedJob:cleanrooms:GetCollaborationAnalysisTemplate,cleanrooms:GetSchemaCreateConfiguredTableAssociation/UpdateConfiguredTableAssociation:iam:PassRoleCreateMembership/UpdateMembership:iam:PassRole,s3:GetBucketLocation; also logging actions if query logging is configured:logs:CreateLogDelivery,logs:CreateLogGroup,logs:DeleteLogDelivery,logs:DescribeLogGroups,logs:DescribeResourcePolicies,logs:GetLogDelivery,logs:ListLogDeliveries,logs:PutResourcePolicy,logs:UpdateLogDeliveryCreateConfiguredTable:glue:GetDatabase,glue:GetDatabases,glue:GetTable,glue:GetTables,glue:GetPartition,glue:GetPartitions,glue:BatchGetPartition,glue:GetSchema,glue:GetSchemaVersion
For
iam:PassRolefailures, verify the policy includesiam:PassRolewithiam:PassedToServicerestricted tocleanrooms.amazonaws.com. Reference: IAM troubleshootingCheck if
AWSCleanRoomsFullAccessNoQueryingis attached — this policy explicitly deniescleanrooms:StartProtectedQueryandcleanrooms:UpdateProtectedQueryand cannot be overridden by adding permissions. Reference: AWS managed policiesCheck for explicit Deny statements that could override Allow (including
aws:PrincipalOrgID, VPC endpoint, or IP restriction conditions)
4. Check S3 Bucket Policy
aws s3api get-bucket-policy --bucket ${bucket_name}Check for explicit Allow/Deny statements for the role
For cross-account: bucket policy MUST explicitly allow the role ARN
aws s3api get-bucket-encryption --bucket ${bucket_name}— ifSSEAlgorithmisaws:kms, extract the KMS key ARN fromKMSMasterKeyID
5. Check KMS Key Policy (if SSE-KMS)
aws kms get-key-policy --key-id ${key_id} --policy-name defaultFor data access roles: verify
kms:Decryptandkms:DescribeKeyFor result receiver roles: also verify
kms:GenerateDataKey(required to write new objects to an SSE-KMS bucket)For cross-account: the KMS key policy MUST explicitly allow the role from the other account
IAM role policy MUST also include these KMS permissions for the specific key ARN
6. Check Lake Formation Permissions (if applicable)
You MUST perform this step for Glue/S3-backed data sources if IAM and S3 policies appear correct, as multiple issues may exist simultaneously. Lake Formation settings apply account-wide to all Glue catalog access.
aws lakeformation get-data-lake-settings --region ${region}If
CreateDatabaseDefaultPermissionsorCreateTableDefaultPermissionsis empty, Lake Formation enforces fine-grained access — IAM Glue permissions alone are not sufficientCheck permissions on the specific Glue table (resolved in Step 2):
aws lakeformation list-permissions --resource-type TABLE --resource '{"Table":{"DatabaseName":"${database_name}","Name":"${table_name}"}}' --region ${region}If the table has
IAM_ALLOWED_PRINCIPALSgranted, Lake Formation is not blocking — look elsewhereIf not, check for explicit grants to the role:
aws lakeformation list-permissions --principal DataLakePrincipalIdentifier=${role_arn} --region ${region}Verify SELECT and DESCRIBE on the relevant database and table
Reference: Lake Formation permissions
7. Check Cross-Account Trust (if applicable)
Re-examine the
AssumeRolePolicyDocumentfrom theaws iam get-roleoutput in Step 3Verify the trust policy contains
"Principal": {"Service": "cleanrooms.amazonaws.com"}and"Action": "sts:AssumeRole"Check
Conditionblock for overly restrictive keys:aws:SourceArn— must match the collaboration or membership ARN patternaws:SourceAccount— must include the collaborating account ID(s)
For cross-account roles, verify the role's account is a member of the collaboration:
aws cleanrooms list-members --collaboration-identifier ${collaboration_id} --region ${region}
8. Generate Diagnosis
Identify the root cause, provide the exact policy fix with CLI commands. Warn the user about security implications of permission changes and suggest least-privilege policies. Reference service role setup docs.
Expected output format:
## Error Classification
- Type: [result writing | data access | table association | caller IAM | iam:PassRole | cross-account]
- Role: [role ARN]
## Diagnostic Results
1. [PASS/FAIL] IAM Role Policies
2. [PASS/FAIL] S3 Bucket Policy
3. [N/A/PASS/FAIL] KMS Key Policy
4. [N/A/PASS/FAIL] Lake Formation
## Root Cause
[One-paragraph explanation]
## Fix
[Exact policy statement + CLI command]Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- AWS
- Publisher
- AWS (Official)
- Source
- aws/agent-toolkit-for-aws · skills/specialized-skills/analytics-skills/aws-cleanrooms · commit 0a218f8
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- NOTICE (added by AutoGineer from NOTICE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by AWS.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download aws-cleanrooms.zip