# Deny IAM and account actions invoked from chat applications

Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.

Deny IAM and account actions invoked from chat applications is an AWS guardrail written in service control policies. Denies IAM, sts:AssumeRole, account and Organizations actions when the request comes through an Amazon Q Developer in chat applications configuration (aws:ChatbotSourceArn). Copied from a licensed open source set and read on 10 Nov 2026.

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Deny",
      "Action": [
        "iam:AddUserToGroup",
        "iam:AttachGroupPolicy",
        "iam:AttachRolePolicy",
        "iam:AttachUserPolicy",
        "iam:CreateAccessKey",
        "iam:CreateLoginProfile",
        "iam:CreateServiceSpecificCredential",
        "iam:DeleteRolePermissionsBoundary",
        "iam:DeleteUserPermissionsBoundary",
        "iam:DeleteRolePolicy",
        "iam:DeleteUserPolicy",
        "iam:DetachRolePolicy",
        "iam:DetachUserPolicy",
        "iam:PutGroupPolicy",
        "iam:PutRolePolicy",
        "iam:PutUserPolicy",
        "iam:ResetServiceSpecificCredential",
        "iam:SetDefaultPolicyVersion",
        "iam:UpdateAccessKey",
        "sts:AssumeRole",
        "account:GetContactInformation",
        "organizations:*"
      ],
      "Resource": "*",
      "Condition": {
        "ArnLike": {
          "aws:ChatbotSourceArn": "arn:aws:chatbot::*:*"
        }
      }
    }
  ]
}
```

- **Blocks:** Denies IAM, sts:AssumeRole, account and Organizations actions when the request comes through an Amazon Q Developer in chat applications configuration (aws:ChatbotSourceArn).
- **Breaks:** Requests for these IAM and Organizations actions made from chat channels fail for every principal; the same actions made from the console or CLI are not matched by the condition. ([source](https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/Service-specific-controls/README.md))
- **Test before applying:** As for every Service control policies guardrail: [how to test before enforcing](/mechanisms/scp/)
- **Mechanism:** [Service control policies (SCPs)](/mechanisms/scp/): IAM users, IAM roles and the root user in member accounts; not the management account and not service-linked roles.
- **Taken from:** [open source set](https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/Service-specific-controls/Amazon-Q-Developer/Deny-actions-invoked-through-Amazon-Q-Developer-in-chat-applications-configurations.json), MIT-0 (README states MIT-0; LICENSE file fetched, MIT-0 text, Copyright Amazon.com, Inc.): https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/LICENSE

## What the policy text names

It names 22 actions or patterns: `iam:AddUserToGroup`, `iam:AttachGroupPolicy`, `iam:AttachRolePolicy`, `iam:AttachUserPolicy`, `iam:CreateAccessKey`, `iam:CreateLoginProfile`, `iam:CreateServiceSpecificCredential`, `iam:DeleteRolePermissionsBoundary`, and more. Its conditions test `aws:ChatbotSourceArn`.

## What the source says

`aws:ChatbotSourceArn` (read 10 Nov 2026).

On what it breaks: "Restrict IAM and account administration actions invoked through Amazon Q Developer in chat applications configurations."

## Related guardrails

- [Configure Cognitive Services accounts to disable public network access](/guardrails/azure-policy-ai-disable-public-network/): Azure, Azure Policy (built-in definitions), ai services
- [Configure Cognitive Services accounts to disable local authentication](/guardrails/azure-policy-ai-disable-local-auth/): Azure, Azure Policy (built-in definitions), ai services
- [Configure Azure AI Services resources to disable local key access](/guardrails/azure-policy-ai-disable-local-auth-dine/): Azure, Azure Policy (built-in definitions), ai services
- [Region deny that allows Bedrock cross-Region inference](/guardrails/aws-scp-region-deny-with-bedrock-cris/): AWS, Service control policies (SCPs), ai services
- [Allow only approved Amazon Bedrock models](/guardrails/aws-scp-bedrock-approved-models-only/): AWS, Service control policies (SCPs), ai services
- [Deny Amazon Bedrock API keys](/guardrails/aws-scp-deny-bedrock-api-keys/): AWS, Service control policies (SCPs), ai services

## Related pages

- [Restrict EC2 launches to approved instance types (AWS Service control policies)](/guardrails/aws-scp-restrict-ec2-instance-types/)
- [Restrict AWS Marketplace subscription changes (AWS Service control policies)](/guardrails/aws-scp-restrict-marketplace-subscriptions/)
- [Deny disabling block public access for AMIs (AWS Service control policies)](/guardrails/aws-scp-deny-disable-ami-block-public-access/)

## Sources

- Deny IAM and account actions invoked from chat applications: https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/Service-specific-controls/Amazon-Q-Developer/Deny-actions-invoked-through-Amazon-Q-Developer-in-chat-applications-configurations.json (read 10 Nov 2026)
- What it breaks: https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/Service-specific-controls/README.md (read 10 Nov 2026)
- How to test it first: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://cloudgovernancetools.com/guardrails/aws-scp-deny-chat-app-iam-actions/
