

# Security in Amazon Q Business
<a name="security"></a>

Cloud security at AWS is the highest priority. As an AWS customer, you benefit from data centers and network architectures that are built to meet the requirements of the most security-sensitive organizations.

Security is a shared responsibility between AWS and you. The [shared responsibility model](https://aws.amazon.com/compliance/shared-responsibility-model/) describes this as security *of* the cloud and security *in* the cloud:
+ **Security of the cloud** – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely. Third-party auditors regularly test and verify the effectiveness of our security as part of the [AWS Compliance Programs](https://aws.amazon.com/compliance/programs/). To learn about the compliance programs that apply to Amazon Q Business, see [AWS Services in Scope by Compliance Program](https://aws.amazon.com/compliance/services-in-scope/).
+ **Security in the cloud** – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors including the sensitivity of your data, your company's requirements, and applicable laws and regulations. 

This documentation helps you understand how to apply the shared responsibility model when using Amazon Q Business. The following topics show you how to configure Amazon Q Business to meet your security and compliance objectives. You also learn how to use other AWS services that help you to monitor and secure your Amazon Q Business resources. 

**Topics**
+ [Data protection in Amazon Q Business](data-protection.md)
+ [Amazon Q Business and interface Amazon VPC endpoints (AWS PrivateLink)](vpc-interface-endpoints.md)
+ [Identity and access management for Amazon Q Business](security-iam.md)
+ [Compliance validation for Amazon Q Business](compliance-validation.md)
+ [Using ACL Analyzer in Amazon Q](acl-analyzer.md)
+ [Resilience in Amazon Q Business](disaster-recovery-resiliency.md)
+ [Infrastructure security in Amazon Q Business](infrastructure-security.md)
+ [Cross-service confused deputy prevention](cross-service-confused-deputy-prevention.md)
+ [Configuration and vulnerability analysis in AWS Identity and Access Management](configuration-and-vulnerability-analysis.md)
+ [Security best practices](security-best-practices.md)

# Data protection in Amazon Q Business
<a name="data-protection"></a>

The AWS [shared responsibility model](https://aws.amazon.com/compliance/shared-responsibility-model/) applies to data protection in Amazon Q Business. As described in this model, AWS is responsible for protecting the global infrastructure that runs all of the AWS Cloud. You are responsible for maintaining control over your content that is hosted on this infrastructure. You are also responsible for the security configuration and management tasks for the AWS services that you use. For more information about data privacy, see the [Data Privacy FAQ](https://aws.amazon.com/compliance/data-privacy-faq/). For information about data protection in Europe, see the [AWS Shared Responsibility Model and GDPR](https://aws.amazon.com/blogs/security/the-aws-shared-responsibility-model-and-gdpr/) blog post on the *AWS Security Blog*.

For data protection purposes, we recommend that you protect AWS account credentials and set up individual users with AWS IAM Identity Center or AWS Identity and Access Management (IAM). That way, each user is given only the permissions necessary to fulfill their job duties. We also recommend that you secure your data in the following ways:
+ Use multi-factor authentication (MFA) with each account.
+ Use SSL/TLS to communicate with AWS resources. We require TLS 1.2 and recommend TLS 1.3.
+ Set up API and user activity logging with AWS CloudTrail. For information about using CloudTrail trails to capture AWS activities, see [Working with CloudTrail trails](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-trails.html) in the *AWS CloudTrail User Guide*.
+ Use AWS encryption solutions, along with all default security controls within AWS services.
+ Use advanced managed security services such as Amazon Macie, which assists in discovering and securing sensitive data that is stored in Amazon S3.
+ If you require FIPS 140-3 validated cryptographic modules when accessing AWS through a command line interface or an API, use a FIPS endpoint. For more information about the available FIPS endpoints, see [Federal Information Processing Standard (FIPS) 140-3](https://aws.amazon.com/compliance/fips/).

We strongly recommend that you never put confidential or sensitive information, such as your customers' email addresses, into tags or free-form text fields such as a **Name** field. This includes when you work with Amazon Q or other AWS services using the console, API, AWS CLI, or AWS SDKs. Any data that you enter into tags or free-form text fields used for names may be used for billing or diagnostic logs. If you provide a URL to an external server, we strongly recommend that you do not include credentials information in the URL to validate your request to that server.

# Data encryption for Amazon Q Business
<a name="data-encryption"></a>

Amazon Q Business supports encryption at rest using a customer supplied symmetric AWS KMS key when provided, or uses an AWS-owned AWS KMS key if no customer managed key is provided. Amazon Q Business also uses HTTPS protocol for data in transit.

**Important**  
Amazon Q does not support asymmetric KMS keys. For more information, see [Using Symmetric and Asymmetric Keys](https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) in the *AWS Key Management Service Developer Guide*.

**Topics**
+ [Encryption at rest](#encryption-rest)
+ [Encryption in transit](#encryption-transit)

## Encryption at rest
<a name="encryption-rest"></a>

Amazon Q Business provides encryption by default to protect sensitive customer data at rest using AWS owned encryption keys. Sensitive customer data includes both questions and answers in the Amazon Q Business web experience and the documents uploaded to Amazon Q Business index. 

The Amazon Q Business uses the questions and answers to know the conversation context and to provide you with the best answer. The conversation data is automatically removed once the conversation is deleted or is inactive. For more information, see [Conversation management](using-web-experience.md#conversation-mgmt). The uploaded documents are used by Amazon Q Business to retrieve them at runtime to answer your questions.
+ **AWS owned keys** – Amazon Q Business uses these keys by default to automatically encrypt sensitive customer data. You can't view, manage, or use AWS owned keys, or audit their use. However, you don't have to take any action or change any programs to protect the keys that encrypt your data. For more information, see [AWS owned keys](https://docs.aws.amazon.com//kms/latest/developerguide/concepts.html#aws-owned-cmk) in the *AWS Key Management Service Developer Guide*. 

  Encryption of data at rest by default helps reduce the operational overhead and complexity involved in protecting sensitive data. At the same time, it enables you to build secure applications that meet strict encryption compliance and regulatory requirements. 

  While you can't disable this layer of encryption or select an alternate encryption type, you can add a second layer of encryption over the existing AWS owned encryption keys by choosing a customer managed key when you create your resources:
+ **AWS KMS key (KMS) ** – Amazon Q supports the use of symmetric customer managed keys that you create, own, and manage to add a second layer of encryption over the existing AWS owned encryption.

  In Amazon Q Business, you configure KMS keys when you create an Amazon Q Business application environment. The same KMS key is used to encrypt data for the application environment you create and any child resources under the application environment (for example, an Amazon Q Business index). However, KMS keys are not supported for the Amazon Q Business Starter index. So, if you use a KMS key with your application environment, you won't be able to use an Amazon Q Business Starter index for it. To use KMS keys, you must choose either an Amazon Q Business Enterprise index or an Amazon Kendra retriever for your application environment.

**Important**  
Amazon Q does not support asymmetric KMS keys. For more information, see [Using Symmetric and Asymmetric Keys](https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) in the *AWS Key Management Service Developer Guide*.

Because you have full control of this layer of encryption, you can perform such tasks as:
+ Establishing and maintaining key policies
+ Establishing and maintaining IAM policies and grants
+ Enabling and disabling key policies
+ Rotating key cryptographic material
+ Adding tags
+ Creating key aliases
+ Scheduling keys for deletion

For more information, see [customer managed key](https://docs.aws.amazon.com//kms/latest/developerguide/concepts.html#customer-cmk) in the *AWS Key Management Service Developer Guide*.

**Note**  
If you have created your Amazon Q Business application environment using AWS KMS and then you want to migrate to using customer managed key (CMK), you will have to re-create your application environment.

**Topics**
+ [How Amazon Q Business uses grants in AWS KMS](#using-grants-kms)
+ [Create a customer managed key](#create-cmk)
+ [Specifying customer managed key for Amazon Q Business](#specify-cmk)
+ [Monitoring your encryption keys for Amazon Q](#monitoring-cmk-key)

### How Amazon Q Business uses grants in AWS KMS
<a name="using-grants-kms"></a>

Amazon Q Business requires a [grant](https://docs.aws.amazon.com//kms/latest/developerguide/grants.html) to use your customer managed key. When you create a Amazon Q Business application environment resource encrypted with a customer managed key, Amazon Q creates a grant on your behalf by sending a [CreateGrant](https://docs.aws.amazon.com//kms/latest/APIReference/API_CreateGrant.html) request to AWS KMS. Grants in AWS KMS are used to give Amazon Q Business access to a KMS key in a customer account.

Amazon Q Business requires the grant to use your customer managed key for the following internal operations:
+ Send [DescribeKey](https://docs.aws.amazon.com//kms/latest/APIReference/API_DescribeKey.html) requests to AWS KMS to verify that the symmetric customer managed key ID entered when creating application environment is valid.
+ Send [GenerateDataKeyWithoutPlainText](https://docs.aws.amazon.com//kms/latest/APIReference/API_GenerateDataKeyWithoutPlaintext.html) requests to AWS KMS to generate data keys encrypted by your customer managed key.
+ Send [Decrypt](https://docs.aws.amazon.com//kms/latest/APIReference/API_Decrypt.html) requests to AWS KMS to decrypt the encrypted data keys so that they can be used to encrypt your data.

 You can revoke access to the grant, or remove the service's access to the customer managed key at any time. If you do, Amazon Q Business won't be able to access any of the data encrypted by the customer managed key, which affects operations that are dependent on that data.

### Create a customer managed key
<a name="create-cmk"></a>

You can create a symmetric customer managed key by using the AWS Management Console, or the AWS KMS APIs.

**Important**  
Amazon Q does not support asymmetric KMS keys. For more information, see [Using Symmetric and Asymmetric Keys](https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) in the *AWS Key Management Service Developer Guide*.

**To create a symmetric customer managed key**

Follow the steps for [Creating symmetric customer managed key](https://docs.aws.amazon.com//kms/latest/developerguide/create-keys.html#create-symmetric-cmk) in the *AWS Key Management Service Developer Guide*.

**Key policy**

Key policies control access to your customer managed key. Every customer managed key must have exactly one key policy, which contains statements that determine who can use the key and how they can use it. When you create your customer managed key, you can specify a key policy. For more information, see [Managing access to customer managed keys](https://docs.aws.amazon.com//kms/latest/developerguide/control-access-overview.html#managing-access) in the *AWS Key Management Service Developer Guide*.

 To use your customer managed key with your Amazon Q Business resources, the following API operations must be permitted in the key policy:
+ [kms:CreateGrant](https://docs.aws.amazon.com//kms/latest/APIReference/API_CreateGrant.html) – Adds a grant to a customer managed key. Grants control access to a specified KMS key,which allows access to [grant operation](https://docs.aws.amazon.com//kms/latest/developerguide/grants.html#terms-grant-operations) Amazon Q Business requires. For more information about [Using Grants](https://docs.aws.amazon.com//kms/latest/developerguide/grants.html), see the *AWS Key Management Service Developer Guide*.

  This allows Amazon Q Business to do the following:
  + Call `GenerateDataKeyWithoutPlainText` to generate an encrypted data key and store it, because the data key isn't immediately used to encrypt.
  + Call `Decrypt` to use the stored encrypted data key to access encrypted data.
  + Set up a retiring principal to allow the service to `RetireGrant`.
+ [kms:DescribeKey](https://docs.aws.amazon.com//kms/latest/APIReference/API_DescribeKey.html) – Provides the customer managed key details to allow Amazon Q to validate the key.

The following are policy statement examples you can add for Amazon Q Business

```
 "Statement": [{
         "Sid": "Allow access to principals authorized to use Amazon Q",
         "Effect": "Allow",
         "Principal": {
             "AWS": "arn:aws:iam::111122223333:role/Admin"
         },
         "Action": [
             "kms:DescribeKey",
             "kms:CreateGrant"
         ],
         "Resource": "*",
         "Condition": {
             "StringEquals": {
                 "kms:ViaService": "qbusiness.region.amazonaws.com",
                 "kms:CallerAccount": "111122223333"
             }
           }
         },
         {
             "Sid": "Allow access for key administrators",
             "Effect": "Allow",
             "Principal": {
                 "AWS": "arn:aws:iam::111122223333:root"
             },
             "Action": [
                 "kms:*"
             ],
             "Resource": "arn:aws:kms:region:111122223333:key/key_ID"
         },
         {
             "Sid": "Allow read-only access to key metadata to the account",
             "Effect": "Allow",
             "Principal": {
                 "AWS": "arn:aws:iam::111122223333:root"
             },
             "Action": [
                 "kms:Describe*",
                 "kms:Get*",
                 "kms:List*",
                 "kms:RevokeGrant"
             ],
             "Resource": "*"
         }
     ]
```

For more information about [specifying permissions in a policy](https://docs.aws.amazon.com//kms/latest/developerguide/control-access-overview.html#overview-policy-elements) and [troubleshooting key access](https://docs.aws.amazon.com//kms/latest/developerguide/policy-evaluation.html#example-no-iam), see the *AWS Key Management Service Developer Guide*

### Specifying customer managed key for Amazon Q Business
<a name="specify-cmk"></a>

You can specify a customer managed key as a second layer encryption for your Amazon Q Business application environment resource.

When you create your application environment, you can specify the data key by entering a **KMS ID**, which Amazon Q Business uses to encrypt the identifiable personal data stored by the application environment.

**KMS ID** – A [key identifier](https://docs.aws.amazon.com//kms/latest/developerguide/concepts.html#key-id) for an AWS KMS customer managed key. Enter a key ID, key ARN, alias name, or alias ARN.

Any resources you create under your Amazon Q Business application environment will be encrypted with the same key.

### Monitoring your encryption keys for Amazon Q
<a name="monitoring-cmk-key"></a>

When you use an AWS KMS customer managed key with your Amazon Q Business resources, you can use [AWS CloudTrail](https://docs.aws.amazon.com//awscloudtrail/latest/userguide/cloudtrail-user-guide.html) or [Amazon CloudWatch Logs](https://docs.aws.amazon.com//AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html) to track requests that Amazon Q Business sends to AWS KMS.

The following examples are AWS CloudTrail events for `CreateGrant`, `GenerateDataKey`, `Decrypt`, and `DescribeKey` to monitor KMS operations called by Amazon Q Business to access data encrypted by your customer managed key.

------
#### [ CreateGrant ]

When you use an AWS KMS customer managed key to encrypt your application environment, Amazon Q sends a `CreateGrant` request on your behalf to access the KMS key in your AWS account. The grant that Amazon Q Business creates are specific to the resource associated with the AWS KMS customer managed key. In addition , Amazon Q Business uses the `RetireGrant` operation to remove a grant when you delete a resource.

The following example event records the `CreateGrant` operation:

```
{
        "eventVersion": "1.08",
        "userIdentity": {
            "type": "AssumedRole",
            "principalId": "AROAIGDTESTANDEXAMPLE:Sampleuser01",
            "arn": "arn:aws:sts::111122223333:assumed-role/Admin/Sampleuser01",
            "accountId": "111122223333",
            "accessKeyId": "AKIAIOSFODNN7EXAMPLE3",
            "sessionContext": {
                "sessionIssuer": {
                    "type": "Role",
                    "principalId": "AROAIGDTESTANDEXAMPLE:Sampleuser01",
                    "arn": "arn:aws:sts::111122223333:assumed-role/Admin/Sampleuser01",
                    "accountId": "111122223333",
                    "userName": "Admin"
                },
                "webIdFederationData": {},
                "attributes": {
                    "mfaAuthenticated": "false",
                    "creationDate": "2021-04-22T17:02:00Z"
                }
            },
            "invokedBy": "qbusiness.amazonaws.com"
        },
        "eventTime": "2021-04-22T17:07:02Z",
        "eventSource": "kms.amazonaws.com",
        "eventName": "CreateGrant",
        "awsRegion": "us-west-2",
        "sourceIPAddress": "172.12.34.56",
        "userAgent": "ExampleDesktop/1.0 (V1; OS)",
        "requestParameters": {
            "retiringPrincipal": "qbusiness.region.amazonaws.com",
            "operations": [
                "CreateGrant",
                "RetireGrant",
                "GenerateDataKey",
                "GenerateDataKeyWithoutPlaintext",
                "Encrypt",
                "ReEncryptTo",
                "ReEncryptFrom",
                "Decrypt",
                "DescribeKey"
            ],
            "keyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE",
            "granteePrincipal": "qbusiness.region.amazonaws.com"
        },
        "responseElements": {
            "grantId": "0ab0ac0d0b000f00ea00cc0a0e00fc00bce000c000f0000000c0bc0a0000aaafSAMPLE"
        },
        "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
        "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
        "readOnly": false,
        "resources": [
            {
                "accountId": "111122223333",
                "type": "AWS::KMS::Key",
                "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE"
            }
        ],
        "eventType": "AwsApiCall",
        "managementEvent": true,
        "eventCategory": "Management",
        "recipientAccountId": "111122223333"
    }
```

------
#### [ GenerateDataKey ]

When you use an AWS KMS customer managed key for your application environment, Amazon Q Business creates a unique table key. It sends a `GenerateDataKey` request to AWS KMS that specifies the AWS KMS customer managed key for the application environment.

The following example event records the `GenerateDataKey` operation:

```
{
        "eventVersion": "1.08",
        "userIdentity": {
            "type": "AWSService",
            "invokedBy": "qbusiness.amazonaws.com"
        },
        "eventTime": "2023-11-24T01:50:25Z",
        "eventSource": "kms.amazonaws.com",
        "eventName": "GenerateDataKey",
        "awsRegion": "us-west-2",
        "sourceIPAddress": "172.12.34.56",
        "userAgent": "ExampleDesktop/1.0 (V1; OS)",
        "requestParameters": {
            "keyId": "arn:aws:kms:us-west-2:398547360552:key/ba6c9092-ad4d-41c3-937a-f02177ae147e",
            "keySpec": "AES_256"
        },
        "responseElements": null,
        "requestID": "4bd8e018-90d0-4b93-bc8d-32338578a158",
        "eventID": "aca6cb5b-44bb-3ed6-afdd-736432323356",
        "readOnly": true,
        "resources": [
            {
                "accountId": "111122223333",
                "type": "AWS::KMS::Key",
                "ARN": "arn:aws:kms:us-west-2:398547360552:key/ba6c9092-ad4d-41c3-937a-f02177ae147e"
            }
        ],
        "eventType": "AwsApiCall",
        "managementEvent": true,
        "recipientAccountId": "398547360552",
        "sharedEventID": "57393866-c398-4fd6-a259-d6cb001c7cf9",
        "eventCategory": "Management"
    }
```

------
#### [ Decrypt ]

When you access an encrypted application environment, Amazon Q Business calls the `Decrypt` operation to use the stored encrypted data key to access the encrypted data.

The following example event records the `Decrypt` operation.

```
{
        "eventVersion": "1.08",
        "userIdentity": {
            "type": "AWSService",
            "invokedBy": "qbusiness.amazonaws.com"
        },
        "eventTime": "2021-04-22T17:10:51Z",
        "eventSource": "kms.amazonaws.com",
        "eventName": "Decrypt",
        "awsRegion": "us-west-2",
        "sourceIPAddress": "172.12.34.56",
        "userAgent": "ExampleDesktop/1.0 (V1; OS)",
        "requestParameters": {
            "keyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE",
            "encryptionAlgorithm": "SYMMETRIC_DEFAULT"
        },
        "responseElements": null,
        "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
        "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
        "readOnly": true,
        "resources": [
            {
                "accountId": "111122223333",
                "type": "AWS::KMS::Key",
                "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE"
            }
        ],
        "eventType": "AwsApiCall",
        "managementEvent": true,
        "eventCategory": "Management",
        "recipientAccountId": "111122223333",
        "sharedEventID": "dc129381-1d94-49bd-b522-f56a3482d088"
    }
```

------
#### [ DescribeKey ]

Amazon Q Business uses the `DescribeKey` operation to verify if the AWS KMS customer managed key associated with your application environment exists in the account and region.

The following example event records `DescribeKey` operation:

```
    {
        "eventVersion": "1.08",
        "userIdentity": {
            "type": "AssumedRole",
            "principalId": "AROAIGDTESTANDEXAMPLE:Sampleuser01",
            "arn": "arn:aws:sts::111122223333:assumed-role/Admin/Sampleuser01",
            "accountId": "111122223333",
            "accessKeyId": "AKIAIOSFODNN7EXAMPLE3",
            "sessionContext": {
                "sessionIssuer": {
                    "type": "Role",
                    "principalId": "AROAIGDTESTANDEXAMPLE:Sampleuser01",
                    "arn": "arn:aws:sts::111122223333:assumed-role/Admin/Sampleuser01",
                    "accountId": "111122223333",
                    "userName": "Admin"
                },
                "webIdFederationData": {},
                "attributes": {
                    "mfaAuthenticated": "false",
                    "creationDate": "2021-04-22T17:02:00Z"
                }
            },
            "invokedBy": "qbusiness.amazonaws.com"
        },
        "eventTime": "2021-04-22T17:07:02Z",
        "eventSource": "kms.amazonaws.com",
        "eventName": "DescribeKey",
        "awsRegion": "us-west-2",
        "sourceIPAddress": "172.12.34.56",
        "userAgent": "ExampleDesktop/1.0 (V1; OS)",
        "requestParameters": {
            "keyId": "00dd0db0-0000-0000-ac00-b0c000SAMPLE"
        },
        "responseElements": null,
        "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
        "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
        "readOnly": true,
        "resources": [
            {
                "accountId": "111122223333",
                "type": "AWS::KMS::Key",
                "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE"
            }
        ],
        "eventType": "AwsApiCall",
        "managementEvent": true,
        "eventCategory": "Management",
        "recipientAccountId": "111122223333"
    }
```

------

## Encryption in transit
<a name="encryption-transit"></a>

Amazon Q Business uses the HTTPS protocol to communicate with your client application environment. It uses HTTPS and AWS Signature Version 4 (SigV4) to communicate with other services on your application environment's behalf. 

**Topics**
+ [Data encryption for Amazon Q Business](data-encryption.md)
+ [Data encryption for Q Apps](data-encryption-qapps.md)
+ [Key management](key-management.md)
+ [Cross-region inference in Amazon Q Business](cross-region-inference.md)
+ [Amazon Q Business Service improvement](service-improvement.md)

# Data encryption for Q Apps
<a name="data-encryption-qapps"></a>

Q Apps stores the following data:
+ Title and description of the Q Apps.
+ Titles of the individual cards.
+ Prompts the builders may specify for the “Text output” cards.
+ Any files uploaded as default values for “File upload” cards.
+ The data that users put into the “Text input” cards when running the Q Apps.
+ Any files uploaded by users when running the Q Apps.

When you create a Amazon Q Business "application" as the application environment for Q Apps after April 30th 2024, Q Apps will be enabled out of the box. If a customer managed key is not configured, then Q Apps encrypts all the above data using AWS-owned keys. For more information, see [AWS owned keys](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk) in the *AWS Key Management Service Developer Guide*.

**Note**  
If you configure a customer managed key when creating an Amazon Q Business application environment, then Q Apps uses the same customer managed key to encrypt all of the above data in Q Apps as well.

Q Apps requires a grant to use your customer managed key. When you create an Amazon Q Business application environment resource encrypted with a customer managed key, Q Apps, creates a grant on your behalf by sending a `CreateGrant` request to AWS KMS. Grants in AWS KMS are used to give Q Apps, access to a KMS key in a customer account.

Q Apps requires the grant to use your customer managed key for the following internal operations:
+ Send `DescribeKey` requests to AWS KMS to verify that the symmetric customer managed key ID entered when creating application environment is valid.
+ Send `GenerateDataKeyWithoutPlainText` requests to AWS KMS to generate data keys encrypted by your customer managed key.
+ Send `Decrypt` requests to AWS KMS to decrypt the encrypted data keys so that they can be used to encrypt your data.

You can revoke access to the grant, or remove the service's access to the customer managed key at any time. If you do, Q Apps won't be able to access any of the data encrypted by the customer managed key, which affects operations that are dependent on that data.

**Note**  
Q Apps has a different service principal and Q Apps creates a different grant from the grant created for "Amazon Q Business". You can specifically revoke access to the grant for "Q Apps" without revoking access to the grant for "Amazon Q Business" or vice versa.

**Enabling Q Apps on Q applications created before April 30th 2024**

If you have already configured a Amazon Q Business application environment to use a customer managed key, when you enable Q Apps feature in the web experience for the first time, under the global controls, a new grant shall be created to the same customer managed key specified when configuring data encryption Amazon Q Business.

Note that disabling Q Apps in the web experience will not automatically revoke this grant because administrators can still list and delete Q Apps in the admin console, even though Q Apps web experience is disabled. But if you delete the Amazon Q Business application environment altogether, then both grants to `qbusiness` and `qapps` shall be revoked. 

You can always revoke access to both the grants or remove access to the customer managed key at any time.

# Key management
<a name="key-management"></a>

Amazon Q Business encrypts the contents of your index using the following types of keys:
+ An AWS-owned AWS KMS. This is the default.
+ A customer-managed KMS key. You can create the key when you are creating an Amazon Q application environment, retriever, index, web experience, data source, or plugins, or you can create the key using the AWS KMS console. Select a symmetric encryption customer-managed KMS key. 
**Important**  
Amazon Q does not support asymmetric KMS keys. For more information, see [Using Symmetric and Asymmetric Keys](https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) in the *AWS Key Management Service Developer Guide*.

# Cross-region inference in Amazon Q Business
<a name="cross-region-inference"></a>

With cross-region inference, Amazon Q Business will automatically select the optimal region within your geography (as described in more detail below) to process your inference request, maximizing available compute resources and model availability, and providing the best customer experience. With cross-region inference, you get:
+ Complete access to most advanced Amazon Q Business AI capabilities and features
+ Access to a variety of models suitable for different tasks
+ Improved performance for all your applications

Cross-region inference requests are kept within the AWS Regions that are part of the geography where the data originally resides. For example, a request made within the US is kept within the AWS Regions in the US. Although the data remains stored only in the primary region, when using cross-region inference, your input prompts and output results may move outside of your primary region. All data will be transmitted encrypted across Amazon's secure network.

**Important**  
Cross-region inference is enabled by default for Amazon Q Business applications. For customers with highly regulated workloads that need to keep data processing resident in-country, contact [AWS Support](https://aws.amazon.com/contact-us/).

**Note**  
There's no additional cost for using cross-region inference.  
Amazon CloudWatch and AWS CloudTrail logs won't specify the AWS Region in which data inference occurs.

## Supported regions for Amazon Q Business cross-region inference
<a name="cross-region-inference-regions"></a>

For a list of Region codes and endpoints supported in Amazon Q Business, see [Amazon Q Business endpoints and quotas](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/quotas-regions.html#regions).


| Supported Amazon Q Business geography | Inference regions | 
| --- | --- | 
| United States |  US East (N. Virginia) (us-east-1) US West (Oregon) (us-west-2)  | 
| Europe |  Europe (Frankfurt) (eu-central-1) Europe (Ireland) (eu-west-1) Europe (Paris) (eu-west-3)  | 
| Australia |  Asia Pacific (Tokyo) (ap-northeast-1) Asia Pacific (Seoul) (ap-northeast-2) Asia Pacific (Osaka) (ap-northeast-3) Asia Pacific (Mumbai) (ap-south-1) Asia Pacific (Singapore) (ap-southeast-1) Asia Pacific (Sydney) (ap-southeast-2)  | 

# Amazon Q Business Service improvement
<a name="service-improvement"></a>

Amazon Q Business does not use customer data for service improvement or for improving underlying LLMs.

# Amazon Q Business and interface Amazon VPC endpoints (AWS PrivateLink)
<a name="vpc-interface-endpoints"></a>

You can establish a private connection between your Amazon VPC and Amazon Q Business by creating an interface VPC endpoint. Interface endpoints are powered by AWS PrivateLink, a technology that allows you to privately access Amazon Q Business APIs without an internet gateway, NAT device, VPN connection, or AWS Direct Connect connection. Instances in your VPC don't need public IP addresses to communicate with Amazon Q Business APIs. Traffic between your VPC and Amazon Q Business doesn't leave the Amazon network.

Before you set up an interface VPC endpoint for Amazon Q Business, make sure that you review the [prerequisites](https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html) in the *Amazon VPC User Guide*.

Amazon Q Business currently only supports making API calls from your VPC for Amazon Q Business APIs only. Using your VPC for the web experience user interface is not supported.

## Creating an interface VPC endpoint for Amazon Q Business
<a name="vpc-endpoint-create"></a>

You can create an interface endpoint for Amazon Q Business using either the Amazon VPC console or the AWS Command Line Interface (AWS CLI).

Create an interface endpoint for Amazon Q Business using the following service name:

```
aws.api.region.qbusiness
```

After you create a VPC endpoint, you can use the following example AWS CLI command that uses the `endpoint-url` parameter to specify an interface endpoint to the Amazon Q Business API:

```
aws qbusiness list-applications --endpoint-url https://VPC endpoint
```

*VPC endpoint* is the DNS name generated when the interface endpoint is created. This name includes the VPC endpoint ID and the Amazon Q Business service name, which includes the region. For example, `vpce-1234-adbcdef-us-west-2a.qbusiness.us-west-2.vpce.amazonaws.com`.

If you enable private DNS for the endpoint, you can make API requests to Amazon Q Business using its default DNS name for the region. For example, `qbusiness.us-west-2.api.aws`.

For more information, see [Creating an interface endpoint](https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html) in the *Amazon VPC User Guide*.

## Creating a VPC endpoint policy for Amazon Q Business
<a name="vpc-endpoint-policy"></a>

An endpoint policy is an IAM resource that you can attach to an interface endpoint. The default endpoint policy allows full access to Amazon Q Business through the interface endpoint. To control the access allowed to Amazon Q Business from your VPC, attach a custom endpoint policy to the interface endpoint.

An endpoint policy specifies the following information:
+ The principals/authorized users who can perform actions (AWS accounts, IAM users, and IAM roles)
+ The actions that can be performed
+ The resources on which the actions can be performed.

For more information, see [Controlling access to services with VPC endpoints](https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-access.html) in the *Amazon VPC User Guide*.

**Example: VPC endpoint policy for Amazon Q Business actions**  
The following is an example of an endpoint policy for Amazon Q Business. When attached to an endpoint, this policy grants access to all available Amazon Q Business actions for all principals/authorized users on all resources.

```
{
   "Statement":[
      {
         "Principal":"*",
         "Effect":"Allow",
         "Action":[
            "qbusiness:*"
         ],
         "Resource":"*"
      }
   ]
}
```

# Identity and access management for Amazon Q Business
<a name="security-iam"></a>

AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely control access to AWS resources. IAM administrators control who can be *authenticated* (signed in) and *authorized* (have permissions) to use Amazon Q resources. IAM is an AWS service that you can use with no additional charge.

**Topics**
+ [Audience](#security_iam_audience)
+ [Authenticating with identities](#security_iam_authentication)
+ [Managing access using policies](#security_iam_access-manage)
+ [How Amazon Q Business works with IAM](security_iam_service-with-iam.md)
+ [Identity-based policy examples for Amazon Q Business](security_iam_id-based-policy-examples.md)
+ [AWS managed policies for Amazon Q Business](security-iam-awsmanpol.md)
+ [AWS managed policies for Amazon Q Apps](security-iam-awsmanpol-qapps.md)
+ [Using service-linked roles for Amazon Q Business](using-service-linked-roles.md)
+ [Using service-linked roles for Amazon Q Apps](using-service-linked-roles-qapps.md)
+ [Troubleshooting Amazon Q Business identity and access](security_iam_troubleshoot.md)

## Audience
<a name="security_iam_audience"></a>

How you use AWS Identity and Access Management (IAM) differs based on your role:
+ **Service user** - request permissions from your administrator if you cannot access features (see [Troubleshooting Amazon Q Business identity and access](security_iam_troubleshoot.md))
+ **Service administrator** - determine user access and submit permission requests (see [How Amazon Q Business works with IAM](security_iam_service-with-iam.md))
+ **IAM administrator** - write policies to manage access (see [Identity-based policy examples for Amazon Q Business](security_iam_id-based-policy-examples.md))

## Authenticating with identities
<a name="security_iam_authentication"></a>

Authentication is how you sign in to AWS using your identity credentials. You must be authenticated as the AWS account root user, an IAM user, or by assuming an IAM role.

You can sign in as a federated identity using credentials from an identity source like AWS IAM Identity Center (IAM Identity Center), single sign-on authentication, or Google/Facebook credentials. For more information about signing in, see [How to sign in to your AWS account](https://docs.aws.amazon.com/signin/latest/userguide/how-to-sign-in.html) in the *AWS Sign-In User Guide*.

For programmatic access, AWS provides an SDK and CLI to cryptographically sign requests. For more information, see [AWS Signature Version 4 for API requests](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html) in the *IAM User Guide*.

### AWS account root user
<a name="security_iam_authentication-rootuser"></a>

 When you create an AWS account, you begin with one sign-in identity called the AWS account *root user* that has complete access to all AWS services and resources. We strongly recommend that you don't use the root user for everyday tasks. For tasks that require root user credentials, see [Tasks that require root user credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#root-user-tasks) in the *IAM User Guide*. 

### Federated identity
<a name="security_iam_authentication-federated"></a>

As a best practice, require human users to use federation with an identity provider to access AWS services using temporary credentials.

A *federated identity* is a user from your enterprise directory, web identity provider, or Directory Service that accesses AWS services using credentials from an identity source. Federated identities assume roles that provide temporary credentials.

For centralized access management, we recommend AWS IAM Identity Center. For more information, see [What is IAM Identity Center?](https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) in the *AWS IAM Identity Center User Guide*.

### IAM users and groups
<a name="security_iam_authentication-iamuser"></a>

An *[IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html)* is an identity with specific permissions for a single person or application. We recommend using temporary credentials instead of IAM users with long-term credentials. For more information, see [Require human users to use federation with an identity provider to access AWS using temporary credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#bp-users-federation-idp) in the *IAM User Guide*.

An [https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html) specifies a collection of IAM users and makes permissions easier to manage for large sets of users. For more information, see [Use cases for IAM users](https://docs.aws.amazon.com/IAM/latest/UserGuide/gs-identities-iam-users.html) in the *IAM User Guide*.

### IAM roles
<a name="security_iam_authentication-iamrole"></a>

An *[IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)* is an identity with specific permissions that provides temporary credentials. You can assume a role by [switching from a user to an IAM role (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-console.html) or by calling an AWS CLI or AWS API operation. For more information, see [Methods to assume a role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage-assume.html) in the *IAM User Guide*.

IAM roles are useful for federated user access, temporary IAM user permissions, cross-account access, cross-service access, and applications running on Amazon EC2. For more information, see [Cross account resource access in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html) in the *IAM User Guide*.

## Managing access using policies
<a name="security_iam_access-manage"></a>

You control access in AWS by creating policies and attaching them to AWS identities or resources. A policy defines permissions when associated with an identity or resource. AWS evaluates these policies when a principal makes a request. Most policies are stored in AWS as JSON documents. For more information about JSON policy documents, see [Overview of JSON policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policies-json) in the *IAM User Guide*.

Using policies, administrators specify who has access to what by defining which **principal** can perform **actions** on what **resources**, and under what **conditions**.

By default, users and roles have no permissions. An IAM administrator creates IAM policies and adds them to roles, which users can then assume. IAM policies define permissions regardless of the method used to perform the operation.

### Identity-based policies
<a name="security_iam_access-manage-id-based-policies"></a>

Identity-based policies are JSON permissions policy documents that you attach to an identity (user, group, or role). These policies control what actions identities can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see [Define custom IAM permissions with customer managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html) in the *IAM User Guide*.

Identity-based policies can be *inline policies* (embedded directly into a single identity) or *managed policies* (standalone policies attached to multiple identities). To learn how to choose between managed and inline policies, see [Choose between managed policies and inline policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-choosing-managed-or-inline.html) in the *IAM User Guide*.

### Resource-based policies
<a name="security_iam_access-manage-resource-based-policies"></a>

Resource-based policies are JSON policy documents that you attach to a resource. Examples include IAM *role trust policies* and Amazon S3 *bucket policies*. In services that support resource-based policies, service administrators can use them to control access to a specific resource. You must [specify a principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html) in a resource-based policy.

Resource-based policies are inline policies that are located in that service. You can't use AWS managed policies from IAM in a resource-based policy.

### Other policy types
<a name="security_iam_access-manage-other-policies"></a>

AWS supports additional policy types that can set the maximum permissions granted by more common policy types:
+ **Permissions boundaries** – Set the maximum permissions that an identity-based policy can grant to an IAM entity. For more information, see [Permissions boundaries for IAM entities](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) in the *IAM User Guide*.
+ **Service control policies (SCPs)** – Specify the maximum permissions for an organization or organizational unit in AWS Organizations. For more information, see [Service control policies](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) in the *AWS Organizations User Guide*.
+ **Resource control policies (RCPs)** – Set the maximum available permissions for resources in your accounts. For more information, see [Resource control policies (RCPs)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html) in the *AWS Organizations User Guide*.
+ **Session policies** – Advanced policies passed as a parameter when creating a temporary session for a role or federated user. For more information, see [Session policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) in the *IAM User Guide*.

### Multiple policy types
<a name="security_iam_access-manage-multiple-policies"></a>

When multiple types of policies apply to a request, the resulting permissions are more complicated to understand. To learn how AWS determines whether to allow a request when multiple policy types are involved, see [Policy evaluation logic](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) in the *IAM User Guide*.

# How Amazon Q Business works with IAM
<a name="security_iam_service-with-iam"></a>

Before you use IAM to manage access to Amazon Q, learn what IAM features are available to use with Amazon Q.






**IAM features you can use with Amazon Q Business**  

| IAM feature | Amazon Q Business support | 
| --- | --- | 
|  [Identity-based policies](#security_iam_service-with-iam-id-based-policies)  |   Yes  | 
|  [Resource-based policies](#security_iam_service-with-iam-resource-based-policies)  |   No   | 
|  [Policy actions](#security_iam_service-with-iam-id-based-policies-actions)  |   Yes  | 
|  [Policy resources](#security_iam_service-with-iam-id-based-policies-resources)  |   Yes  | 
|  [Policy condition keys](#security_iam_service-with-iam-id-based-policies-conditionkeys)  |   Yes  | 
|  [ACLs](#security_iam_service-with-iam-acls)  |   No   | 
|  [ABAC (tags in policies)](#security_iam_service-with-iam-tags)  |   Yes  | 
|  [Temporary credentials](#security_iam_service-with-iam-roles-tempcreds)  |   Yes  | 
|  [Principal permissions](#security_iam_service-with-iam-principal-permissions)  |   Yes  | 
|  [Service roles](#security_iam_service-with-iam-roles-service)  |   Yes  | 
|  [Service-linked roles](#security_iam_service-with-iam-roles-service-linked)  |   Partial  | 

To get a high-level view of how Amazon Q Business and other AWS services work with most IAM features, see [AWS services that work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) in the *IAM User Guide*.

## Identity-based policies for Amazon Q Business
<a name="security_iam_service-with-iam-id-based-policies"></a>

**Supports identity-based policies:** Yes

Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see [Define custom IAM permissions with customer managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html) in the *IAM User Guide*.

With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. To learn about all of the elements that you can use in a JSON policy, see [IAM JSON policy elements reference](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html) in the *IAM User Guide*.

### Identity-based policy examples for Amazon Q Business
<a name="security_iam_service-with-iam-id-based-policies-examples"></a>



To view examples of Amazon Q identity-based policies, see [Identity-based policy examples for Amazon Q Business](security_iam_id-based-policy-examples.md).

## Resource-based policies within Amazon Q Business
<a name="security_iam_service-with-iam-resource-based-policies"></a>

**Supports resource-based policies:** No 

Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM *role trust policies* and Amazon S3 *bucket policies*. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must [specify a principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html) in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services.

To enable cross-account access, you can specify an entire account or IAM entities in another account as the principal in a resource-based policy. For more information, see [Cross account resource access in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html) in the *IAM User Guide*.

## Policy actions for Amazon Q Business
<a name="security_iam_service-with-iam-id-based-policies-actions"></a>

**Supports policy actions:** Yes

Administrators can use AWS JSON policies to specify who has access to what. That is, which **principal** can perform **actions** on what **resources**, and under what **conditions**.

The `Action` element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Include actions in a policy to grant permissions to perform the associated operation.



To see a list of Amazon Q Business actions, see [Actions Defined by Amazon Q Business ](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_your_service.html#your_service-actions-as-permissions) in the *Service Authorization Reference*.

Policy actions in Amazon Q Business use the following prefix before the action:

```
qbusiness
```

Policy actions in Amazon Q Business use the following prefix before the action: `qbusiness:`. For example, to grant someone permission to list an Amazon Q application with the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListApplications.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListApplications.html) API operation, you include the `qbusiness:ListIndices` action in their policy. Policy statements must include either an `Action` or `NotAction` element. Amazon Q defines its own set of actions that describe tasks that you can perform with this service.

To specify multiple actions in a single statement, separate them with commas.

```
"Action": [
      "qbusiness:action1",
      "qbusiness:action2"
         ]
```





To view examples of Amazon Q identity-based policies, see [Identity-based policy examples for Amazon Q Business](security_iam_id-based-policy-examples.md).

## Policy resources for Amazon Q Business
<a name="security_iam_service-with-iam-id-based-policies-resources"></a>

**Supports policy resources:** Yes

Administrators can use AWS JSON policies to specify who has access to what. That is, which **principal** can perform **actions** on what **resources**, and under what **conditions**.

The `Resource` JSON policy element specifies the object or objects to which the action applies. As a best practice, specify a resource using its [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html). For actions that don't support resource-level permissions, use a wildcard (\$1) to indicate that the statement applies to all resources.

```
"Resource": "*"
```





To view examples of Amazon Q identity-based policies, see [Identity-based policy examples for Amazon Q Business](security_iam_id-based-policy-examples.md).

## Policy condition keys for Amazon Q Business
<a name="security_iam_service-with-iam-id-based-policies-conditionkeys"></a>

**Supports service-specific policy condition keys:** Yes

Administrators can use AWS JSON policies to specify who has access to what. That is, which **principal** can perform **actions** on what **resources**, and under what **conditions**.

The `Condition` element specifies when statements execute based on defined criteria. You can create conditional expressions that use [condition operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html), such as equals or less than, to match the condition in the policy with values in the request. To see all AWS global condition keys, see [AWS global condition context keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html) in the *IAM User Guide*.

To see a list of Amazon Q Business condition keys, see [Condition Keys for Amazon Q Business ](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_your_service.html#your_service-policy-keys) in the *Service Authorization Reference*. To learn with which actions and resources you can use a condition key, see [Actions Defined by Amazon Q Business ](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_your_service.html#your_service-actions-as-permissions).

To view examples of Amazon Q identity-based policies, see [Identity-based policy examples for Amazon Q Business](security_iam_id-based-policy-examples.md).

## ACLs in Amazon Q Business
<a name="security_iam_service-with-iam-acls"></a>

**Supports ACLs:** No 

Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format.

## ABAC with Amazon Q
<a name="security_iam_service-with-iam-tags"></a>

**Supports ABAC (tags in policies):** Yes

Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on attributes called tags. You can attach tags to IAM entities and AWS resources, then design ABAC policies to allow operations when the principal's tag matches the tag on the resource.

To control access based on tags, you provide tag information in the [condition element](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) of a policy using the `aws:ResourceTag/key-name`, `aws:RequestTag/key-name`, or `aws:TagKeys` condition keys.

If a service supports all three condition keys for every resource type, then the value is **Yes** for the service. If a service supports all three condition keys for only some resource types, then the value is **Partial**.

For more information about ABAC, see [Define permissions with ABAC authorization](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction_attribute-based-access-control.html) in the *IAM User Guide*. To view a tutorial with steps for setting up ABAC, see [Use attribute-based access control (ABAC)](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) in the *IAM User Guide*.

The following table lists the actions, corresponding resource types, and condition keys for tag-based access control. Each action is authorized based on the tags associated with the corresponding resource type.


| Action | Resource type | Condition keys | 
| --- | --- | --- | 
|  [CreateApplication](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_CreateApplication.html)  |   | aws:ResourceTag, aws:RequestTag, aws:TagKeys | 
| [CreateDataSource](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_CreateDataSource.html) |   | aws:ResourceTag, aws:RequestTag, aws:TagKeys | 
|  [CreateIndex](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_CreateIndex.html)  |   | aws:ResourceTag, aws:RequestTag, aws:TagKeys | 
|  [CreatePlugin](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_CreatePlugin.html)  |   | aws:ResourceTag, aws:RequestTag, aws:TagKeys | 
|  [CreateRetriever](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_CreateRetriever.html)  |   | aws:ResourceTag, aws:RequestTag, aws:TagKeys | 
|  [CreateWebExperience](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_CreateWebExperience.html)  |   | aws:ResourceTag, aws:RequestTag, aws:TagKeys | 
|  [ListTagsForResource](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListTagsForResource.html)  | application, index, retriever, data source, web experience, plugin |   | 
| [TagResource](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_TagResource.html)  | application, index, retriever, data source, web experience, plugin | aws:ResourceTag, aws:RequestTag, aws:TagKeys | 
| [UntagResource](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_UntagResource.html)  | application, index, retriever, data source, web experience, plugin | aws:TagKeys | 

## Using temporary credentials with Amazon Q Business
<a name="security_iam_service-with-iam-roles-tempcreds"></a>

**Supports temporary credentials:** Yes

Temporary credentials provide short-term access to AWS resources and are automatically created when you use federation or switch roles. AWS recommends that you dynamically generate temporary credentials instead of using long-term access keys. For more information, see [Temporary security credentials in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) and [AWS services that work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) in the *IAM User Guide*.

## Cross-service principal permissions for Amazon Q Business
<a name="security_iam_service-with-iam-principal-permissions"></a>

**Supports forward access sessions (FAS):** Yes

 Forward access sessions (FAS) use the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. For policy details when making FAS requests, see [Forward access sessions](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_forward_access_sessions.html). 

## Service roles for Amazon Q
<a name="security_iam_service-with-iam-roles-service"></a>

**Supports service roles:** Yes

 A service role is an [IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see [Create a role to delegate permissions to an AWS service](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html) in the *IAM User Guide*. 

**Warning**  
Changing the permissions for a service role might break Amazon Q Business functionality. Edit service roles only when Amazon Q Business provides guidance to do so.

## Service-linked roles for Amazon Q Business
<a name="security_iam_service-with-iam-roles-service-linked"></a>

**Supports service-linked roles:** Partial

 A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. 

For details about creating or managing Amazon Q Business service-linked roles, see [Using service-linked roles for Amazon Q Business](using-service-linked-roles.md).

For details about creating or managing service-linked roles, see [AWS services that work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html). Find a service in the table that includes a `Yes` in the **Service-linked role** column. Choose the **Yes** link to view the service-linked role documentation for that service.

# Identity-based policy examples for Amazon Q Business
<a name="security_iam_id-based-policy-examples"></a>

By default, users and roles don't have permission to create or modify Amazon Q resources. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies.

To learn how to create an IAM identity-based policy by using these example JSON policy documents, see [Create IAM policies (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create-console.html) in the *IAM User Guide*.

For details about actions and resource types defined by Amazon Q, including the format of the ARNs for each of the resource types, see [Actions, Resources, and Condition Keys for Amazon Q Business ](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_your_service.html) in the *Service Authorization Reference*.

**Topics**
+ [Policy best practices](#security_iam_service-with-iam-policy-best-practices)
+ [Using the Amazon Q console](#security_iam_id-based-policy-examples-console)
+ [Allow users to view their own permissions](#security_iam_id-based-policy-examples-view-own-permissions)
+ [Allow a user to converse with Amazon Q Business](#security_iam_id-based-policy-examples-application-1)
+ [Allow an admin to manage plugins in an application](#security_iam_id-based-policy-examples-plugins-1)
+ [Allow an admin to manage a specific plugin](#security_iam_id-based-policy-examples-plugins-2)
+ [Tag-based policy examples](#examples-tagging)

## Policy best practices
<a name="security_iam_service-with-iam-policy-best-practices"></a>

Identity-based policies determine whether someone can create, access, or delete Amazon Q resources in your account. These actions can incur costs for your AWS account. When you create or edit identity-based policies, follow these guidelines and recommendations:
+ **Get started with AWS managed policies and move toward least-privilege permissions** – To get started granting permissions to your users and workloads, use the *AWS managed policies* that grant permissions for many common use cases. They are available in your AWS account. We recommend that you reduce permissions further by defining AWS customer managed policies that are specific to your use cases. For more information, see [AWS managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies) or [AWS managed policies for job functions](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html) in the *IAM User Guide*.
+ **Apply least-privilege permissions** – When you set permissions with IAM policies, grant only the permissions required to perform a task. You do this by defining the actions that can be taken on specific resources under specific conditions, also known as *least-privilege permissions*. For more information about using IAM to apply permissions, see [ Policies and permissions in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) in the *IAM User Guide*.
+ **Use conditions in IAM policies to further restrict access** – You can add a condition to your policies to limit access to actions and resources. For example, you can write a policy condition to specify that all requests must be sent using SSL. You can also use conditions to grant access to service actions if they are used through a specific AWS service, such as CloudFormation. For more information, see [ IAM JSON policy elements: Condition](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) in the *IAM User Guide*.
+ **Use IAM Access Analyzer to validate your IAM policies to ensure secure and functional permissions** – IAM Access Analyzer validates new and existing policies so that the policies adhere to the IAM policy language (JSON) and IAM best practices. IAM Access Analyzer provides more than 100 policy checks and actionable recommendations to help you author secure and functional policies. For more information, see [Validate policies with IAM Access Analyzer](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-policy-validation.html) in the *IAM User Guide*.
+ **Require multi-factor authentication (MFA)** – If you have a scenario that requires IAM users or a root user in your AWS account, turn on MFA for additional security. To require MFA when API operations are called, add MFA conditions to your policies. For more information, see [ Secure API access with MFA](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html) in the *IAM User Guide*.

For more information about best practices in IAM, see [Security best practices in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) in the *IAM User Guide*.

## Using the Amazon Q console
<a name="security_iam_id-based-policy-examples-console"></a>

To access the Amazon Q Business console, you must have a minimum set of permissions. These permissions must allow you to list and view details about the Amazon Q resources in your AWS account. If you create an identity-based policy that is more restrictive than the minimum required permissions, the console won't function as intended for entities (users or roles) with that policy.

You don't need to allow minimum console permissions for users that are making calls only to the AWS CLI or the AWS API. Instead, allow access to only the actions that match the API operation that they're trying to perform.

To ensure that users and roles can still use the Amazon Q Business console, also attach the [`ReadOnlyAcess`AWS managed policy](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/ReadOnlyAccess.html) to the entities. For more information, see [Adding permissions to a user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html#users_change_permissions-add-console) in the *IAM User Guide*.

## Allow users to view their own permissions
<a name="security_iam_id-based-policy-examples-view-own-permissions"></a>

This example shows how you might create a policy that allows IAM users to view the inline and managed policies that are attached to their user identity. This policy includes permissions to complete this action on the console or programmatically using the AWS CLI or AWS API.

```
{
    "Version": "2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "ViewOwnUserInfo",
            "Effect": "Allow",
            "Action": [
                "iam:GetUserPolicy",
                "iam:ListGroupsForUser",
                "iam:ListAttachedUserPolicies",
                "iam:ListUserPolicies",
                "iam:GetUser"
            ],
            "Resource": ["arn:aws:iam::*:user/${aws:username}"]
        },
        {
            "Sid": "NavigateInConsole",
            "Effect": "Allow",
            "Action": [
                "iam:GetGroupPolicy",
                "iam:GetPolicyVersion",
                "iam:GetPolicy",
                "iam:ListAttachedGroupPolicies",
                "iam:ListGroupPolicies",
                "iam:ListPolicyVersions",
                "iam:ListPolicies",
                "iam:ListUsers"
            ],
            "Resource": "*"
        }
    ]
}
```

## Allow a user to converse with Amazon Q Business
<a name="security_iam_id-based-policy-examples-application-1"></a>

This example allows a user to start conversations with Amazon Q Business, view past conversations, and delete their conversation history for a specific Amazon Q Business application. The IAM context key *qbusiness:userId* is used to restrict permissions to a specific user. 

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Action": [
                "qbusiness:ChatSync",
                "qbusiness:ListMessages",
                "qbusiness:ListConversations",
                "qbusiness:GetWebExperience",
                "qbusiness:DeleteConversation",
                "qbusiness:GetMedia"
            ],
            "Resource": [
                "arn:aws:qbusiness:us-east-1:111122223333:application/application-id"
            ],
            "Effect": "Allow",
            "Sid": "QBusinessChatPermissions"
        }
    ]
}
```

------

## Allow an admin to manage plugins in an application
<a name="security_iam_id-based-policy-examples-plugins-1"></a>

This example allows an Amazon Q Business admin to manage plugins in a chat application.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Action": [
                "qbusiness:CreatePlugin",
                "qbusiness:ListPlugins",
                "qbusiness:GetPlugin",
                "qbusiness:UpdatePlugin",
                "qbusiness:DeletePlugin"
            ],
            "Resource": [
                "arn:aws:qbusiness:us-east-1:111122223333:application/application-id"
            ],
            "Effect": "Allow",
            "Sid": "QBusinessListPermissions"
        }
    ]
}
```

------

## Allow an admin to manage a specific plugin
<a name="security_iam_id-based-policy-examples-plugins-2"></a>

This example allows an Amazon Q Business admin to manage a specific plugin.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Action": [
                "qbusiness:GetPlugin",
                "qbusiness:UpdatePlugin",
                "qbusiness:DeletePlugin"
            ],
            "Resource": [
                "arn:aws:qbusiness:us-east-1:111122223333:application/application-id",
                "arn:aws:qbusiness:us-east-1:111122223333:application/application-id/plugin/plugin-id"
            ],
            "Effect": "Allow",
            "Sid": "QBusinessGetPermissions"
        }
    ]
}
```

------

## Tag-based policy examples
<a name="examples-tagging"></a>

Tag-based policies are JSON policy documents that specify the actions that a principal can perform on tagged resources. 

### Example: Use a tag to access a resource
<a name="example-tags-enable-chat"></a>

This example policy grants a user or role in your AWS account permission to use the `ChatSync` operation with any resource tagged with the key **department** and the value **finance**.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Action": [
                "qbusiness:ChatSync"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Allow",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/department": "finance"
                }
            },
            "Sid": "QBusinessChatPermissions"
        }
    ]
}
```

------

### Example: Use a tag to activate operations
<a name="example-tags-enable-operations"></a>

This example policy grants a user or role in your AWS account permission to use any Amazon Q Business operation except the `TagResource` operation with any resource tagged with the key **department** and the value **finance**.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "QBusinessFullAccessPermissions",
            "Effect": "Allow",
            "Action": "qbusiness:*",
            "Resource": "*"
        },
        {
            "Sid": "QBusinessPermissions",
            "Effect": "Deny",
            "Action": [
                "qbusiness:TagResource"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/department": "finance"
                }
            }
        }
    ]
}
```

------

### Example: Use a tag to restrict access to an operation
<a name="examples-tags-restrict-operations"></a>

This example policy restricts access for a user or role in your AWS account to use the `ChatSync` operation unless the user provides the **department** tag and it has the allowed values **finance** and **IT**.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Action": "qbusiness:ChatSync",
            "Resource": "arn:aws:qbusiness:us-east-1:111122223333:application/application-id",
            "Effect": "Allow",
            "Sid": "QBusinessChatSyncPermissions"
        },
        {
            "Action": "qbusiness:ChatSync",
            "Resource": "arn:aws:qbusiness:us-east-1:111122223333:application/application-id",
            "Effect": "Deny",
            "Condition": {
                "Null": {
                    "aws:ResourceTag/department": "true"
                }
            },
            "Sid": "DenyChatSyncWithoutDepartmentTag"
        },
        {
            "Action": "qbusiness:ChatSync",
            "Resource": "*",
            "Effect": "Deny",
            "Condition": {
                "ForAnyValue:StringNotEquals": {
                    "aws:ResourceTag/department": [
                        "finance",
                        "IT"
                    ]
                }
            },
            "Sid": "DenyChatSyncForUnauthorizedDepts"
        }
    ]
}
```

------







# AWS managed policies for Amazon Q Business
<a name="security-iam-awsmanpol"></a>







An AWS managed policy is a standalone policy that is created and administered by AWS. AWS managed policies are designed to provide permissions for many common use cases so that you can start assigning permissions to users, groups, and roles.

Keep in mind that AWS managed policies might not grant least-privilege permissions for your specific use cases because they're available for all AWS customers to use. We recommend that you reduce permissions further by defining [ customer managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#customer-managed-policies) that are specific to your use cases.

You cannot change the permissions defined in AWS managed policies. If AWS updates the permissions defined in an AWS managed policy, the update affects all principal identities (users, groups, and roles) that the policy is attached to. AWS is most likely to update an AWS managed policy when a new AWS service is launched or new API operations become available for existing services.

For more information, see [AWS managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies) in the *IAM User Guide*.









**Topics**
+ [AWS managed policy: QBusinessServiceRolePolicy](#security-iam-awsmanpol-amazonq-app-role-policy)
+ [AWS managed policy: QBusinessQuicksightPluginPolicy](#security-iam-awsmanpol-amazonq-quicksight-policy)
+ [Amazon Q Business updates to AWS managed policies](#security-iam-awsmanpol-updates)

## AWS managed policy: QBusinessServiceRolePolicy
<a name="security-iam-awsmanpol-amazonq-app-role-policy"></a>





Amazon Q Business uses a `QBusinessServiceRolePolicy` to enable an Amazon Q Business application to access CloudWatch resources and write CloudWatch logs. You can't attach `QBusinessServiceRolePolicy` to your IAM entities. This policy is attached to a service-linked role that allows Amazon Q Business to perform actions on your behalf. For more information, see [Using service-linked roles for Amazon Q Business](using-service-linked-roles.md).



**Permissions details**

This policy includes the following permissions.




+ `logs` – Allows Amazon Q Business to describe and write to CloudWatch log streams.



------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "QBusinessPutMetricDataPermission",
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutMetricData"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "cloudwatch:namespace": "AWS/QBusiness"
                }
            }
        },
        {
            "Sid": "QBusinessCreateLogGroupPermission",
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogGroup"
            ],
            "Resource": [
                "arn:aws:logs:*:*:log-group:/aws/qbusiness/*"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "QBusinessDescribeLogGroupsPermission",
            "Effect": "Allow",
            "Action": [
                "logs:DescribeLogGroups"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "QBusinessLogStreamPermission",
            "Effect": "Allow",
            "Action": [
                "logs:DescribeLogStreams",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": [
                "arn:aws:logs:*:*:log-group:/aws/qbusiness/*:log-stream:*"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        }
    ]
}
```

------

## AWS managed policy: QBusinessQuicksightPluginPolicy
<a name="security-iam-awsmanpol-amazonq-quicksight-policy"></a>

Amazon Q Business uses a `QBusinessQuicksightPluginPolicy` to enable an Amazon Q Business application to access Amazon Quick topics and dashboards for the Amazon Q Business Quick plugin. When you configure the plugin, you specify a service role that has `PredictQAResults` permissions for Quick topics and dashboards. You can use the following `QBusinessQuicksightPluginPolicy` policy to grant these permissions. 

**Note**  
To grant the necessary permissions, the trust policy of the role must grant Quick assume role permissions. For more information see [Using the Quick plugin to get insights from structured data](quicksight-plugin.md). 

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "QBusinessToQuickSightPredictQAResultsInvocation",
      "Effect": "Allow",
      "Action": [
        "quicksight:PredictQAResults"
      ],
      "Resource": [
        "arn:aws:quicksight:*:*:topic/*",
        "arn:aws:quicksight:*:*:dashboard/*"
      ]
    }
  ]
}
```

------





## Amazon Q Business updates to AWS managed policies
<a name="security-iam-awsmanpol-updates"></a>



View details about updates to AWS managed policies for Amazon Q Business since this service began tracking these changes. For automatic alerts about changes to this page, subscribe to the RSS feed on the [Amazon Q Business Document history page](https://docs.aws.amazon.com/amazonq/latest/business-use-dg/doc-history.html).




| Change | Description | Date | 
| --- | --- | --- | 
|  AWS managed policy: QBusinessQuicksightPluginPolicy  |  Added AWS managed policy QBusinessQuicksightPluginPolicy to access Amazon Quick resources for the QuickSight plugin.  | December 3, 2024 | 
|  Amazon Q Business started tracking changes  |  Amazon Q Business started tracking changes for its AWS managed policies.  | April 30, 2024 | 

# AWS managed policies for Amazon Q Apps
<a name="security-iam-awsmanpol-qapps"></a>







An AWS managed policy is a standalone policy that is created and administered by AWS. AWS managed policies are designed to provide permissions for many common use cases so that you can start assigning permissions to users, groups, and roles.

Keep in mind that AWS managed policies might not grant least-privilege permissions for your specific use cases because they're available for all AWS customers to use. We recommend that you reduce permissions further by defining [ customer managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#customer-managed-policies) that are specific to your use cases.

You cannot change the permissions defined in AWS managed policies. If AWS updates the permissions defined in an AWS managed policy, the update affects all principal identities (users, groups, and roles) that the policy is attached to. AWS is most likely to update an AWS managed policy when a new AWS service is launched or new API operations become available for existing services.

For more information, see [AWS managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies) in the *IAM User Guide*.









## AWS managed policy: QAppsServiceRolePolicy
<a name="security-iam-awsmanpol-amazonq-app-role-policy-qapps"></a>





Amazon Q Apps uses a `QAppsServiceRolePolicy` to enable an Amazon Q Apps to access CloudWatch resources and populate CloudWatch metrics. You can't attach `QAppsServiceRolePolicy` to your IAM entities. This policy is attached to a service-linked role that allows Amazon Q Apps to perform actions on your behalf. For more information, see [Using service-linked roles for Amazon Q Apps](using-service-linked-roles-qapps.md).



**Permissions details**

This policy includes the following permissions.




+ `cloudwatch` – Allows Amazon Q Apps to publish metric data points to CloudWatch under the AWS/QApps namespace



------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "QAppsPutMetricDataPermission",
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutMetricData"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "cloudwatch:namespace": "AWS/QApps"
                }
            }
        }
    ]
}
```

------





## Amazon Q Apps updates to AWS managed policies
<a name="security-iam-awsmanpol-updates"></a>



View details about updates to AWS managed policies for Amazon Q Apps since this service began tracking these changes. For automatic alerts about changes to this page, subscribe to the RSS feed on the [Amazon Q Business Document history page](https://docs.aws.amazon.com/amazonq/latest/business-use-dg/doc-history.html).




| Change | Description | Date | 
| --- | --- | --- | 
|   [QAppsServiceRolePolicy](#security-iam-awsmanpol-amazonq-app-role-policy-qapps) - New policy   |  Amazon Q Apps added a new policy that grants permissions needed for Q Apps to publish metrics  | Sep 30, 2024 | 
|  Amazon Q Apps started tracking changes  |  Amazon Q Apps started tracking changes for its AWS managed policies.  | Sep 30, 2024 | 

# Using service-linked roles for Amazon Q Business
<a name="using-service-linked-roles"></a>

Amazon Q Business uses AWS Identity and Access Management (IAM)[ service-linked roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role). A service-linked role is a unique type of IAM role that is linked directly to Amazon Q Business. Service-linked roles are predefined by Amazon Q Business and include all the permissions that the service requires to call other AWS services on your behalf.

A service-linked role makes setting up Amazon Q Business easier because you don’t have to manually add the necessary permissions. Amazon Q Business defines the permissions of its service-linked roles, and unless defined otherwise, only Amazon Q Business can assume its roles. The defined permissions include the trust policy and the permissions policy, and that permissions policy cannot be attached to any other IAM entity.

You can delete a service-linked role only after first deleting their related resources. This protects your Amazon Q Business resources because you can't inadvertently remove permission to access the resources.

For information about other services that support service-linked roles, see [AWS services that work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) and look for the services that have **Yes** in the **Service-linked roles** column. Choose a **Yes** with a link to view the service-linked role documentation for that service.

## Service-linked role permissions for Amazon Q Business
<a name="slr-permissions"></a>

Amazon Q Business uses one service-linked role named `AWSServiceRoleForQBusiness` that performs certain actions in your account. Examples of these actions include allowing CloudWatch to publish metrics and logs to your AWS account.

### QBusinessServiceRolePolicy permissions details
<a name="QBusinessServiceRolePolicy-permissions"></a>

The `QBusinessServiceRolePolicy` allows Amazon Q Business to complete the following administrative actions on the user's behalf on all applicable AWS resources:
+ `logs` – Allows Amazon Q Business to describe, create and write to CloudWatch log streams
+ `cloudwatch` – Allows Amazon Q Business to publish metric data points to CloudWatch under the AWS/QBusiness namespace

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "QBusinessPutMetricDataPermission",
            "Effect": "Allow",
            "Action": [
                "cloudwatch:PutMetricData"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "cloudwatch:namespace": "AWS/QBusiness"
                }
            }
        },
        {
            "Sid": "QBusinessCreateLogGroupPermission",
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogGroup"
            ],
            "Resource": [
                "arn:aws:logs:*:*:log-group:/aws/qbusiness/*"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "QBusinessDescribeLogGroupsPermission",
            "Effect": "Allow",
            "Action": [
                "logs:DescribeLogGroups"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        },
        {
            "Sid": "QBusinessLogStreamPermission",
            "Effect": "Allow",
            "Action": [
                "logs:DescribeLogStreams",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": [
                "arn:aws:logs:*:*:log-group:/aws/qbusiness/*:log-stream:*"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:ResourceAccount": "${aws:PrincipalAccount}"
                }
            }
        }
    ]
}
```

------

Any updates to this policy are described in [Amazon Q Business updates to AWS managed policies](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/security-iam-awsmanpol.html).

You must configure permissions to allow an IAM entity (such as a user, group, or role) to create, edit, or delete a service-linked role. For more information, see [Service-Linked Role Permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#service-linked-role-permissions) in the IAM User Guide.

## Creating a service-linked role for Amazon Q Business
<a name="create-slr"></a>

You don't need to manually create a service-linked role. When you [create an Amazon Q Business application](https://docs.aws.amazon.com/amazonq/latest/business-use-dg/create-app.html) in the AWS Management Console, the AWS CLI, or the AWS API, Amazon Q Business creates the service-linked role for you. 

If you delete this service-linked role, and then need to create it again, you can use the same process to recreate the role in your account. When you create a new application, Amazon Q Business creates the service-linked role for you again. 

You can also use the IAM console to create a service-linked role. In the IAM CLI or the IAM API, create a service-linked role with the `qbusiness.amazonaws.com` service name. For more information, see [Creating a service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#create-service-linked-role) in the IAM User Guide. If you delete this service-linked role, you can use this same process to create the role again.

You can also choose to create an Amazon Q Business application with a service role instead of a service-linked role. However, using a service-linked role is recommended.

## For Amazon Q Business applications created before April 2024
<a name="migrate-to-slr"></a>

If your Amazon Q Business application was created before April 2024, it uses a [service role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html) instead of a [service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html).

To migrate your existing application from a service role to a service-linked role, create a service-linked role with the `qbusiness.amazonaws.com` service name. Then, if you use the console, select to use the newly created service-linked role when you [update your application](https://docs.aws.amazon.com/amazonq/latest/business-use-dg/supported-app-actions.html#update-app). If you use the API, provide the ARN of the service-linked role as the `roleArn` parameter when you use the [UpdateApplication](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_UpdateApplication.html) API action.

For more information, see [Creating a service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#create-service-linked-role) in the IAM User Guide.

## Editing a service-linked role for Amazon Q Business
<a name="edit-slr"></a>

Amazon Q Business does not allow you to edit service-linked roles. After you create a service-linked role, you cannot change the name of the role because various entities might reference the role. However, you can edit the description of the role using IAM. For more information, see [Editing a service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#edit-service-linked-role) in the *IAM User Guide*.

## Changing between a service-role and a service-linked role for Amazon Q Business
<a name="update-slr"></a>

You can choose to update the service-linked role you are using when you update an application.

For an application using a service role, you can update the role to a service-linked role.

For an application already using a service-linked role, you can update the role to a service role.

You can also choose to continue using a service role, or update an existing service role with a new one.

**Note**  
Using a service-linked role is recommended.

For more information on how to update your application, see [Updating an application](https://docs.aws.amazon.com/amazonq/latest/business-use-dg/supported-app-actions.html#update-app).

## Deleting a service-linked role for Amazon Q Business
<a name="delete-slr"></a>

You can manually delete your `AWSServiceRoleForQBusiness` role. If you no longer need to use a feature or service that requires a service-linked role, we recommend that you delete that role. That way you don’t have an unused entity that is not actively monitored or maintained. However, you must delete your application before you can manually delete the service-linked role associated with it.

**Note**  
If the Amazon Q Business service is using the role when you try to delete the resources, then the deletion might fail. If that happens, wait for a few minutes and try the operation again.

**To manually delete the service-linked role using IAM**

Use the IAM console, the IAM CLI, or the IAM API to delete the `AWSServiceRoleForQBusiness` service-linked role. For more information, see [Deleting a Service-Linked Role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#delete-service-linked-role) in the *IAM User Guide*.

## Supported regions for Amazon Q Business service-linked roles
<a name="slr-regions"></a>

Amazon Q Business supports using service-linked roles in all of the regions where the service is available. For more information, see [Amazon Q Business endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/amazonq.html).

# Using service-linked roles for Amazon Q Apps
<a name="using-service-linked-roles-qapps"></a>

Amazon Q Apps uses AWS Identity and Access Management (IAM)[ service-linked roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role). A service-linked role is a unique type of IAM role that is linked directly to Amazon Q Apps. Service-linked roles are predefined by Amazon Q Apps and include all the permissions that the service requires to performs Q Apps related administrative actions to other AWS services on your behalf.

A service-linked role makes setting up Amazon Q Apps easier because you don’t have to manually add the necessary permissions. Amazon Q Apps defines the permissions of its service-linked roles, and unless defined otherwise, only Amazon Q Apps can assume its roles. The defined permissions include the trust policy and the permissions policy, and that permissions policy cannot be attached to any other IAM entity.

You can delete a service-linked role only after first deleting their related resources. This protects your Amazon Q Apps resources because you can't inadvertently remove permission to access the resources.

For information about other services that support service-linked roles, see [AWS services that work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) and look for the services that have **Yes** in the **Service-linked roles** column. Choose a **Yes** with a link to view the service-linked role documentation for that service.

## Service-linked role permissions for Amazon Q Apps
<a name="slr-permissions"></a>

Amazon Q Apps uses one service-linked role named `AWSServiceRoleForAmazonQApps` that performs Q Apps related administrative actions in your account. Examples of these actions include allowing CloudWatch to publish metrics to your AWS account.

 The `AWSServiceRoleForAmazonQApps` service-linked role trusts the following services to assume the role: 
+ qapps.amazonaws.com

 The `AWSServiceRoleForAmazonQApps` service-linked role uses the managed policy `QAppsServiceRolePolicy`. 

The content of this policy and any updates to it are described in [AWS managed policies for Amazon Q Apps](security-iam-awsmanpol-qapps.md). 

You must configure permissions to allow an IAM entity (such as a user, group, or role) to create, edit, or delete a service-linked role. For more information, see [Service-Linked Role Permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#service-linked-role-permissions) in the IAM User Guide.

## Creating a service-linked role for Amazon Q Apps
<a name="create-slr"></a>

You don't need to manually create a service-linked role. When you [create an Amazon Q Business application](https://docs.aws.amazon.com/amazonq/latest/business-use-dg/create-app.html) in the AWS Management Console, the AWS CLI, or the AWS API, Amazon Q Apps creates the service-linked role for you. 

If you delete this service-linked role, and then need to create it again, you can use the same process to recreate the role in your account. When you create a new application, Amazon Q Apps creates the service-linked role for you again. 

## Editing a service-linked role for Amazon Q Apps
<a name="edit-slr"></a>

Amazon Q Apps does not allow you to edit service-linked roles. After you create a service-linked role, you cannot change the name of the role because various entities might reference the role. However, you can edit the description of the role using IAM. For more information, see [Editing a service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#edit-service-linked-role) in the *IAM User Guide*.

## Deleting a service-linked role for Amazon Q Apps
<a name="delete-slr"></a>

You can manually delete your `AWSServiceRoleForQApps` role. If you no longer need to use a feature or service that requires a service-linked role, we recommend that you delete that role. That way you don’t have an unused entity that is not actively monitored or maintained. However, you must delete your Q application or turn on QApps on all existing Q applications before you can manually delete the service-linked role associated with it.

**Note**  
If the Amazon Q Apps service is using the role when you try to delete the resources, then the deletion might fail. If that happens, wait for a few minutes and try the operation again.

**To manually delete the service-linked role using IAM**

Use the IAM console, the IAM CLI, or the IAM API to delete the `AWSServiceRoleForQApps` service-linked role. For more information, see [Deleting a Service-Linked Role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#delete-service-linked-role) in the *IAM User Guide*.

## Supported regions for Amazon Q Apps service-linked roles
<a name="slr-regions"></a>

Amazon Q Apps supports using service-linked roles in all of the regions where the service is available. For more information, see [Amazon Q Business endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/amazonq.html).

# Troubleshooting Amazon Q Business identity and access
<a name="security_iam_troubleshoot"></a>

Use the following information to help you diagnose and fix common issues that you might encounter when working with Amazon Q and IAM.

**Topics**
+ [I am not authorized to perform an action in Amazon Q Business](#security_iam_troubleshoot-no-permissions)
+ [I am not authorized to perform iam:PassRole](#security_iam_troubleshoot-passrole)
+ [I want to allow people outside of my AWS account to access my Amazon Q Business resources](#security_iam_troubleshoot-cross-account-access)

## I am not authorized to perform an action in Amazon Q Business
<a name="security_iam_troubleshoot-no-permissions"></a>

If you receive an error that you're not authorized to perform an action, your policies must be updated to allow you to perform the action.

The following example error occurs when the `mateojackson` IAM user tries to use the console to view details about a fictional `my-example-widget` resource but doesn't have the fictional `qbusiness:GetWidget` permissions.

```
User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: qbusiness:GetWidget on resource: my-example-widget
```

In this case, the policy for the `mateojackson` user must be updated to allow access to the `my-example-widget` resource by using the `qbusiness:GetWidget` action.

If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials.

## I am not authorized to perform iam:PassRole
<a name="security_iam_troubleshoot-passrole"></a>

If you receive an error that you're not authorized to perform the `iam:PassRole` action, your policies must be updated to allow you to pass a role to Amazon Q.

Some AWS services allow you to pass an existing role to that service instead of creating a new service role or service-linked role. To do this, you must have permissions to pass the role to the service.

The following example error occurs when an IAM user named `marymajor` tries to use the console to perform an action in Amazon Q. However, the action requires the service to have permissions that are granted by a service role. Mary does not have permissions to pass the role to the service.

```
User: arn:aws:iam::123456789012:user/marymajor is not authorized to perform: iam:PassRole
```

In this case, Mary's policies must be updated to allow her to perform the `iam:PassRole` action.

If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials.

## I want to allow people outside of my AWS account to access my Amazon Q Business resources
<a name="security_iam_troubleshoot-cross-account-access"></a>

You can create a role that users in other accounts or people outside of your organization can use to access your resources. You can specify who is trusted to assume the role. For services that support resource-based policies or access control lists (ACLs), you can use those policies to grant people access to your resources.

To learn more, consult the following:
+ To learn whether Amazon Q supports these features, see [How Amazon Q Business works with IAM](security_iam_service-with-iam.md).
+ To learn how to provide access to your resources across AWS accounts that you own, see [Providing access to an IAM user in another AWS account that you own](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_aws-accounts.html) in the *IAM User Guide*.
+ To learn how to provide access to your resources to third-party AWS accounts, see [Providing access to AWS accounts owned by third parties](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html) in the *IAM User Guide*.
+ To learn how to provide access through identity federation, see [Providing access to externally authenticated users (identity federation)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_federated-users.html) in the *IAM User Guide*.
+ To learn the difference between using roles and resource-based policies for cross-account access, see [Cross account resource access in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html) in the *IAM User Guide*.

# Compliance validation for Amazon Q Business
<a name="compliance-validation"></a>

 Third-party auditors assess the security and compliance of Amazon Q Business as part of multiple Amazon Q Business compliance programs. Amazon Q Business is compliant with the following:
+ Health Insurance Portability and Accountability Act (HIPAA)
+ System and Organization Controls (SOC) 1, 2, 3
+ Payment Card Industry (PCI)
+ International Standards Organization (ISO) 42001

To learn whether an AWS service is within the scope of specific compliance programs, see [AWS services in Scope by Compliance Program](https://aws.amazon.com/compliance/services-in-scope/) and choose the compliance program that you are interested in. For general information, see [AWS Compliance Programs](https://aws.amazon.com/compliance/programs/).

You can download third-party audit reports using AWS Artifact. For more information, see [Downloading Reports in AWS Artifact](https://docs.aws.amazon.com/artifact/latest/ug/downloading-documents.html).

Your compliance responsibility when using AWS services is determined by the sensitivity of your data, your company's compliance objectives, and applicable laws and regulations. For more information about your compliance responsibility when using AWS services, see [AWS Security Documentation](https://docs.aws.amazon.com/security/).

# Using ACL Analyzer in Amazon Q
<a name="acl-analyzer"></a>

The ACL (Access Control List) Analyzer is a troubleshooting tool that helps you verify and diagnose document access permissions in your Amazon Q applications. When users report issues accessing specific documents, you can use this tool to quickly determine whether a user has the necessary permissions and understand why access might be granted or denied. The tool provides detailed information about user memberships, group associations, and the specific access control rules affecting document accessibility. This makes it particularly useful for administrators who need to validate access controls or investigate permission-related issues.

## Prerequisites
<a name="acl-analyzer-prerequisites"></a>
+ An AWS account with appropriate permissions for Amazon Q Business
+ Access to the Amazon Q Business service in the AWS Console

## Getting Started with ACL Analyzer
<a name="acl-analyzer-getting-started"></a>

**To access Amazon Q Business**

1. Sign in to the AWS Management Console.

1. Open the Amazon Q Business console.

**To select or create an application:**

1. In the navigation pane, choose **Applications**.

1. Do one of the following:
   + Choose an existing application from the list.
   + Create a new application.
**Note**  
The application you select or create will be used as the context for checking document access permissions.

**To configure user access**

1. On the application details page, choose **Manage access and subscriptions**.

1. Choose the **Users** tab.

1. Choose **Add groups and users**.

1. Do one of the following:

1. 

   1. To add new users:

      Choose **Add new users**.

   1. Enter the required user information.

   1. Choose **Done**.

1. 

   1.  To assign existing users: 

      Choose **Assign existing users**.

   1. Search for and select the desired user.

   1. Choose **Assign**.

## Configuring Data Sources
<a name="acl-analyzer-configure-data-sources"></a>

**To configure a new data source**

1. On the application details page, choose **Add data source**.

1. Select your desired data source type from the available options.

1. Follow the configuration prompts specific to your selected data source type.

1. Configure the ACL settings for your data source. For detailed instructions, see:
   + [Setting up data sources](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/s3-connector.html)
   + [Managing user access](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/s3-user-management.html)

**To use an existing data source**

1. On the application details page, choose **Data sources**.

1. From the list of data sources, select the data source you want to use.

## Using the ACL Analyzer Tool
<a name="acl-analyzer-using-acl-analyzer"></a>

**To check document access permissions**

1. On the data source details page, choose the **Troubleshooting tools** tab.

1. Locate the **ACL Analyzer** section.

1. Enter the following required information:
   + For **Document ID**, enter the unique identifier of the document you want to check.
**Note**  
The Document ID must conform to the pattern specified in the API documentation.
   + For **User ID**, enter the ID of the user whose access you want to verify, typically this is an email address.

1. Choose **Check access**.

### Understanding the Results
<a name="acl-analyzer-understanding-results"></a>

After running the ACL Analyzer check, you'll see results in three main sections:

#### Access Status
<a name="acl-analyzer-access-status"></a>

The system displays one of the following status messages:
+ A success message indicating "**User has access**" when access is granted.
+ An error message indicating "**User doesn't have access**" when access is denied.

#### User Membership Table
<a name="acl-analyzer-user-membership"></a>

This table provides the following information:
+ All user aliases associated with the checked user ID.
+ User or group mapping information.
+ Source configurations for each membership. Datasource level ACL applies only to the datasource and index level ACL applies to the entire index/application.

#### Access Control List (ACL) Table
<a name="acl-analyzer-acl-table"></a>

This table shows:
+ The allowlist of Users/Groups with access to the specified document, as defined by documentId.

# Resilience in Amazon Q Business
<a name="disaster-recovery-resiliency"></a>

The AWS global infrastructure is built around AWS Regions and Availability Zones. AWS Regions provide multiple physically separated and isolated Availability Zones, which are connected with low-latency, high-throughput, and highly redundant networking. With Availability Zones, you can design and operate applications and databases that automatically fail over between zones without interruption. Availability Zones are more highly available, fault tolerant, and scalable than traditional single or multiple data center infrastructures. 

For more information about AWS Regions and Availability Zones, see [AWS Global Infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/).

# Infrastructure security in Amazon Q Business
<a name="infrastructure-security"></a>

As a managed service, Amazon Q Business is protected by AWS global network security. For information about AWS security services and how AWS protects infrastructure, see [AWS Cloud Security](https://aws.amazon.com/security/). To design your AWS environment using the best practices for infrastructure security, see [Infrastructure Protection](https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/infrastructure-protection.html) in *Security Pillar AWS Well‐Architected Framework*.

You use AWS published API calls to access Amazon Q through the network. Clients must support the following:
+ Transport Layer Security (TLS). We require TLS 1.2 and recommend TLS 1.3.
+ Cipher suites with perfect forward secrecy (PFS) such as DHE (Ephemeral Diffie-Hellman) or ECDHE (Elliptic Curve Ephemeral Diffie-Hellman). Most modern systems such as Java 7 and later support these modes.

# Cross-service confused deputy prevention
<a name="cross-service-confused-deputy-prevention"></a>

The confused deputy problem is a security issue where an entity that doesn't have permission to perform an action can coerce a more-privileged entity to perform the action. In AWS, cross-service impersonation can result in the confused deputy problem. Cross-service impersonation can occur when one service (the *calling service*) calls another service (the *called service*). The calling service can be manipulated to use its permissions to act on another customer's resources in a way it should not otherwise have permission to access. To prevent this, AWS provides tools that help you protect your data for all services with service principals that have been given access to resources in your account. 

We recommend using the [https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourcearn](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourcearn) global condition context key in resource policies to limit the permissions that Amazon Q Business gives another service to the resource.

The value of `aws:SourceArn` must be `qbusiness::Application`.

The following example—which grants Amazon Q Business permission to perform a decryption action on an AWS KMS key within the scope of an Amazon Q Business application—shows how you can use the `aws:SourceArn` global condition context key in Amazon Q Business to prevent the confused deputy problem.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": {
        "Sid": "ConfusedDeputyPreventionExamplePolicy",
        "Effect": "Allow",
        "Principal": {
            "Service": "qbusiness.amazonaws.com"
        },
        "Action": "kms:Decrypt",
        "Resource": [
            "arn:aws:qbusiness:us-east-1:111122223333:application/application-id/*"
        ],
        "Condition": {
            "ArnLike": {
                "aws:SourceArn": "arn:aws:qbusiness:us-east-1:111122223333:application/*"
            }
        }
    }
}
```

------

# Configuration and vulnerability analysis in AWS Identity and Access Management
<a name="configuration-and-vulnerability-analysis"></a>

AWS handles basic security tasks like guest operating system (OS) and database patching, firewall configuration, and disaster recovery. These procedures have been reviewed and certified by the appropriate third parties. For more details, see the following resources:
+ [Shared Responsibility Model](https://aws.amazon.com/compliance/shared-responsibility-model/)
+ AWS: [Overview of Security Processes](https://d0.awsstatic.com/whitepapers/Security/AWS_Security_Whitepaper.pdf) (whitepaper)

The following resources also address configuration and vulnerability analysis in AWS Identity and Access Management (IAM):
+ [Compliance validation for AWS Identity and Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/iam-compliance-validation.html)
+ [Security best practices and use cases in AWS Identity and Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/IAMBestPracticesAndUseCases.html).

# Security best practices
<a name="security-best-practices"></a>

Amazon Q Business provides several security features to consider as you develop and implement your own security policies. The following best practices are general guidelines and don't represent a complete security solution. Because these best practices might not be appropriate or sufficient for your environment, treat them as helpful considerations rather than prescriptions.

## Apply principle of least privilege
<a name="security-least-privilege"></a>

Amazon Q provides a granular access policy for applications using IAM roles. We recommend that the roles be granted only the minimum set of privileges required by the job, such as covering your application and access to log destination. We also recommend auditing the jobs for permissions on a regular basis and upon any change to your application.

## Role-based access control (RBAC) permissions
<a name="security-practice-rbac"></a>

Administrators should strictly control role-based access control (RBAC) permissions for Amazon Q applications.