
I Connected a Glue Table to AWS Context and Tried Asking Questions in the Management Console Chat
This page has been translated by machine translation. View original
Introduction
Hello, I'm Masaoka from the West Japan Development Team, Generative AI Integration Department, AI Business Division.
AWS Context became generally available (GA) at re:Invent 2026.
AWS Context is a service that automatically extracts entities and relationships from connected databases and documents and builds a context graph (What you get).
I was curious about how this works, so I prepared fictional data, connected it to AWS Context, and tried out what kind of context graph gets built and whether it can answer questions based on it.
What We'll Build

We'll connect Glue tables to AWS Context.
On the AWS Context side, we'll create Connections and an Agent Context, then ask questions from the chat in the management console to check how it behaves.
Sample Data
We'll use contract and billing data from a fictional attendance management SaaS, "Sample Attendance."
It consists of four tables: customers, contracts, invoices, and plans.

I had already saved them as Parquet files in S3 and defined them as tables in the Glue database saas_demo in us-east-1.
Let's Try It
Creating Connections

Connections are the gateway from AWS Context to data sources.
Here you decide which data to target and which permissions to use when reading the data.
Open the AWS Context console in us-east-1 and click "Create connection" under "Connections."

First, choose a data source.

Each data source has an "Agent access" column containing either "Discovery and retrieval" or "Discovery only."
With "Discovery only," it seems that it doesn't read the data each time a question is asked, and only metadata can be ingested (compatibility table).
Select "AWS Glue" and click "Next."

Enter saas-demo-glue as the Connection name and leave the Data source location as "This AWS account."

Below that, there is a box labeled "Enable auto-discovery to ingest assets across services."
Auto-discovery is a feature that gathers metadata from AWS services such as S3 and Glue into the Glue Data Catalog (Enabling auto-discovery in AWS Glue Data Catalog).
At first I clicked "Next" without enabling it and got stopped by the error Enable auto-discovery to choose the data to ingest.

When you click the button in the box, the display changes to "Auto-discovery enabled" and a list of selectable data appears.

Auto-discovery is not a per-Connections setting; it applies at the account and region level.
Once enabled, anyone who can search the catalog in that account can also find metadata from participating services such as S3 and RDS.
Open "AWS Glue" in the list, navigate through Catalogs, AWSDataCatalog, and Databases, and check saas_demo.
The higher-level items were checked automatically as well.

Click "Next" to proceed to the permissions settings.

The Ingestion role is the role that Glue assumes when writing data to the Agent Context.
I left this at the default "Create and use a new service role."
Data access is the setting for which permissions are used to read data when asking questions.
This time I chose "Use caller credentials (recommended)."
With this option, the Glue tables (this time, the four in saas_demo) are read with the permissions of the IAM user or role that calls the Agent Context.
Click "Next" to go to the confirmation screen.

Click "Create connection" and the Connections are created.

The status became Active.
The connection name ended up as saas-demo-glue-glue, the name I entered plus the service name, oops...
I'll just go with it for now.
(Looking carefully, the description of Connection name said that each selected service gets a name in the form <name>-<service>...)
Each service you choose gets its own connection, named
<name>-<service>. So does each catalog other than the default, named<name>-<service>-<catalog>.
Creating an Agent Context

An Agent Context is a container of information for answering questions.
It holds the connections between tables and columns ingested from Connections (the context graph), and chat questions are sent to it.
Open "Agent context" in the left menu and click "Create agent context."

I named it saas-demo.
The Description serves as a kind of tool description when an agent discovers the Agent Context, so I wrote what kind of information it contains.

Click "Add connection" under Connections and add saas-demo-glue-glue.

Clicking "Configure" on the added Connections lets you narrow down the databases and tables to ingest.
Since we use all four tables this time, I left the defaults "All databases" and "All tables."

I left Curation policies and Trace analysis settings at their defaults.
After clicking the create button and waiting a little while, the status became Active.
Looking at the Ingested Entities
When I looked away for a bit, 39 entities had already been ingested.

| Type | Count | Contents |
|---|---|---|
| Column | 26 | Columns of the 4 tables |
| Table | 4 | contracts, customers, invoices, plans |
| Schema | 1 | saas_demo (Glue database) |
| LineageDataset | 4 | S3 paths where the Parquet files are placed |
| Job | 4 | One per table |
The Details tab shows the connections between entities as a graph.

Column, Table, and Schema are the databases and tables defined in Glue themselves.
On the other hand, LineageDataset and Job were entities representing what data those tables were created from.
When I opened the Job saas_demo.contracts, the Description contained the ARN of the IAM role that created the table, along with a CONSUMES relationship to the S3 path and a PRODUCES relationship to the table.
It seems the connection "this table was created from this S3 path" (data lineage) has been ingested.
With this lineage, the agent can apparently answer questions like "where did the data come from?" (Data lineage).

Looking at Ontologies
Besides "Agent context" and "Connections," the left menu has an item called "Ontologies."
An ontology defines the types of entities and relationships that go into an Agent Context.
I haven't configured anything this time, but when I opened it there were three.

All of them had the Type System and were provided in AWS Context from the start (Built-in ontologies).
Opening Data shows types such as Column and Job that appeared in the earlier entities.

Asking Questions
Click "Chat with context" on the Agent Context screen.

A screen where you can ask questions opens within the management console.

For the first question, I asked for the number of contracts per plan, excluding trials and cancelled ones.

It returned Starter 29, Business 25, and Enterprise 8, which matches the data I put in the Glue tables.
Actually, the status column of the contracts table contains the codes T, A, and C, and to check how far it can answer with undocumented data, I deliberately didn't put their meanings anywhere.
T is trial, A is active, and C is cancelled.
In its answer it inferred T as trial and C as cancelled, and the inference was correct.
Below the answer, it shows how much time it took, how many steps it went through, and how much information it retrieved and cited.
For the second question, I asked for the number of customers per sales area.

East was 30 and west was 30, which also matches the data I put in the Glue tables.
Tracing the Agent's Behavior
When you turn on "Details" in the chat, "Trace details" opens on the right side and shows what the agent did before answering as a list of events.

There seem to be two kinds of events: planning and retrieval.
It repeats a flow in which planning decides what to investigate next and retrieval executes it to get information.
The flow for the first question looks like this.

First it searches the Agent Context to find relevant tables, then examines how values are stored in the status column and the definitions of the codes.
After that, it aggregates the counts per plan, and once there was nothing left to investigate, it returned the answer.
Summary
This time, I connected fictional data prepared in S3 and Glue tables to AWS Context and asked questions in the management console chat.
I could see that a context graph is built in the Agent Context, and that answers are returned by repeating planning and information retrieval based on it.
AWS Context, which became GA at re:Invent, still has many interesting features, so I'd like to keep trying them out.
