Skip to content
Cloud Governance Tools

Deny IAM and account actions invoked from chat applications

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.

More ai services guardrails ยท About Service control policies

{
  "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)
Test before applying
As for every Service control policies guardrail: how to test before enforcing
Mechanism
Service control policies (SCPs): 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, 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."

Sources

  1. Deny IAM and account actions invoked from chat applications, read 10 Nov 2026
  2. What it breaks, read 10 Nov 2026
  3. How to test it first, read 10 Nov 2026

Last reviewed 16 Nov 2026.