Connect an agent context to Quick
You can attach an existing agent context from AWS Context to AWS Quick. After you attach it, users can ask questions in Quick chat, and Quick retrieves answers from the data in your agent context, using each user's own access permissions.
The agent context can be in the same AWS account as your Quick account, or in a different account.
This guide covers the Quick side. It assumes you already created an agent context in AWS Context.
Topics
Supported AWS Regions
You can connect an agent context to Quick in the following AWS Regions:
-
US East (N. Virginia)
-
US West (Oregon)
-
Europe (Ireland)
Prerequisites
Before you attach an agent context, make sure that you have the following:
-
A Quick account in one of the supported Regions
-
An agent context with its data connections configured and synced
-
The ARN of the agent context
-
Quick administrator access
Attach the agent context
To attach an agent context to Quick
-
Open AWS Quick at https://quicksight.aws.amazon.com/
. -
Choose Sign in to Quick and sign in as an administrator.
-
Open the admin landing page for your account in the same Region as the agent context:
https://, whereREGION.quicksight.aws.amazon.com/sn/account/account-name/admin/landingREGIONis the Region of your agent context andaccount-nameis your Quick account (subscription) name. -
On the admin page, choose AWS Resources.
-
Find the AWS Context entry and choose Add Agent Context.
-
Enter the ARN of the agent context.
-
Choose Save.
When you save, Quick sets up the access it needs in your account to read from the agent context that you specified. Agent context tools can take up to 15 minutes to become available in Quick chat.
If your agent context connects to third-party data sources through Credential Broker, you must tag each Credential Broker instance with the following key-value pair. The key and value must match exactly; without this tag, Quick can't access the instances.
- Key
-
QuickSightContextAccess - Value
-
true
Change the agent context
To point Quick at a different agent context
-
Open the admin AWS Resources page for your account.
-
Edit the agent context ARN.
-
Choose Save.
Detach the agent context
To detach the agent context
-
On the admin AWS Resources page, clear the AWS Context checkbox.
-
Choose Save.
Quick no longer has access to your agent context.
Use the agent context in Quick chat
After you attach the agent context, users can ask questions in Quick chat that require its data, and Quick searches and traverses the agent context to answer them.
Each user can turn agent context capabilities on or off for themselves.
To set agent context capabilities for your account
-
On the home page, choose Customize.
-
Choose Connectors.
-
Choose AWS Context.
-
Enable or disable each capability (search, explore, and ask).
-
For each enabled capability, choose Ask each time, Always allow, or Always deny.
This setting is per user, and it appears only after an administrator attaches an agent context to Quick.
Data source access
Quick accesses your agent context through a Quick-managed role,
aws-quicksight-context-role-v0, that has permissions only to AWS Context,
not to your underlying data sources. Whether a data connection returns results in
Quick depends on the credential model that you chose for that connection in
AWS Context.
Connections that use a data access role
If a data connection uses a data access role, it works with Quick
without additional setup. AWS Context assumes the data access role, which carries
the data-source permissions. Where the source supports it, AWS Context propagates
each user's identity for per-user authorization. The
aws-quicksight-context-role-v0 role needs no changes.
Connections that use caller credentials
If a data connection uses caller credentials, AWS Context queries the data source
with the credentials of the caller. On the Quick path, the caller is the
aws-quicksight-context-role-v0 role, which has no data-source
permissions by default. The connection returns no results until you grant that role
access. To grant access, add an inline policy to
aws-quicksight-context-role-v0 that allows the actions the connection
needs on the data source.
We recommend that you add the permissions as an inline policy on
aws-quicksight-context-role-v0. Adding them as a managed policy, or
modifying the AWS Context managed policy on the role, can prevent
Quick from updating the role later, for example when you change the
agent context ARN.
All Quick access to this account's agent contexts shares the
aws-quicksight-context-role-v0 role. Permissions that you
add apply to every user who queries through Quick, bounded only where
the data source enforces the propagated end-user identity. Grant least
privilege.
Trusted identity propagation
For a complete overview of trusted identity propagation in AWS Quick, see Trusted identity propagation in AWS Quick.
Quick uses trusted identity propagation (TIP) to pass the identity of the user who makes a request through to AWS Context. This lets AWS Context enforce per-user access to your data. For example, AWS Context applies access control lists (ACLs) for Amazon Bedrock knowledge bases and AWS Lake Formation permissions for AWS Glue Data Catalog tables, as well as the permissions of other data sources connected to your agent context. Each user sees only the data that they are permitted to access.
If your Quick account uses IAM Identity Center, Quick can pass user identity to AWS Context only if you do one of the following:
-
In the IAM Identity Center console, choose Settings, and under Simplified experience for trusted identity propagation, choose Enable.
-
Have an identity propagation configuration set for your Quick account.
If you don't have an identity propagation configuration, AWS Context returns only public documents, or none at all, for IAM Identity Center users.
To check whether your account has an identity propagation configuration
-
Run the following AWS CLI command. Replace
111122223333with your AWS account ID andREGIONwith your Region:aws quicksight list-identity-propagation-configs --aws-account-id111122223333--regionREGION
If the command returns a configuration, no further action is needed. Any identity propagation configuration lets Quick propagate user identity. If it returns none, create one.
To create an identity propagation configuration
-
Run the following AWS CLI command once. It uses the service
GLUE_DATA_CATALOGand no authorized targets. Replace111122223333with your AWS account ID andREGIONwith your Region:aws quicksight update-identity-propagation-config --aws-account-id111122223333--service GLUE_DATA_CATALOG --regionREGION
Cross-account access
If your agent context is in a different AWS account than your Quick account, add a resource policy to the agent context that allows the Quick agent context role in your Quick account to access it.
To configure cross-account access
-
Attach the agent context to Quick as described in Attach the agent context. Quick creates the role in your Quick account when you save.
-
In the account that owns the agent context, add the following resource policy, replacing the placeholder values with your values:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "AllowQuickAgentContextAccess", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::111122223333:role/service-role/aws-quicksight-context-role-v0" }, "Action": [ "context:GetAgentContext", "context:SearchAgentContext", "context:TraverseAgentContext", "context:AgenticRetrieve", "context:AgenticRetrieveStream" ], "Resource": "arn:aws:context:REGION:444455556666:agent-context/my-agent-context-id" } ] }
Replace the placeholder values as follows:
-
111122223333is the Quick account ID, the account that owns the Quick agent context role. -
444455556666is the account that owns the agent context. -
my-agent-context-idis the ID portion of the agent context ARN. -
REGIONis the Region of your agent context.
These two accounts are intentionally different, because this is cross-account access.
The following AWS CLI command adds the policy, replacing the placeholder values with your values:
aws context put-resource-policy --regionREGION--resource-arn arn:aws:context:REGION:444455556666:agent-context/my-agent-context-id--policy file://policy.json
If you delete and recreate the Quick agent context role, update the resource policy so that it refers to the new role.