[Update] I tried out Amazon Redshift's new integration with Agent Toolkit for AWS, which allows it to be managed from AI agents
This page has been translated by machine translation. View original
This is Ishikawa from the Cloud Business Division. Amazon Redshift has been integrated with Agent Toolkit for AWS, providing Redshift skills for AI agents, so I actually tried it out with Claude Code.
Amazon Redshift is now integrated with Agent Toolkit for AWS, enabling AI agents like Claude Code, Kiro, and Cursor to directly build, query, troubleshoot, and migrate Amazon Redshift data warehouses and data lakes. There are no additional charges and no changes to existing infrastructure required, so anyone who regularly operates Amazon Redshift can try this update right away.
What is Agent Toolkit for AWS
Agent Toolkit for AWS is a set of tools designed to help AI coding agents build effectively on AWS. Announced in May 2026, it consists of the following three elements.
-
Agent Skills
A package of procedures, scripts, and reference materials for completing specific tasks. Agents load only the skills they need on demand, reducing context window consumption.
-
AWS MCP Server
A fully managed MCP (Model Context Protocol) server. Equipped with IAM-based guardrails, CloudWatch/CloudTrail monitoring, and a sandboxed code execution environment, it executes authenticated AWS APIs on behalf of users.
-
Agent Plugins
Bundles the AWS MCP Server configuration and a curated skill set into a single installation.
This integration combines the AWS MCP Server with skills for Amazon Redshift (Redshift skills).
What's in This Update
This integration combines the AWS MCP Server, which handles authenticated AWS API execution, with Redshift skills that provide knowledge about Amazon Redshift.
What Are Redshift Skills
Agent Skills are packages of procedures, scripts, and reference materials for completing specific tasks. Agents load only the skills they need on demand, reducing context window consumption.
Redshift skills are the Amazon Redshift version of these, covering SQL syntax references, metadata discovery, data load patterns, materialized view best practices, function and data type guidance, and extensions such as Qualify, Pivot, and Super. The skills were structured as follows.
The agent loads only the files that match the intent of the question, following the Routing Table in SKILL.md.
How to Set Up
Installing the aws-data-analytics plugin sets up both the AWS MCP Server configuration and Redshift skills at once.
For Claude Code
Run the claude command and execute the following commands in order in interactive mode.
/plugin install aws-data-analytics@claude-plugins-official
/reload-plugins
If you are using AWS CLI (version 2.36.35 or later), an interactive setup wizard detects installed AI coding agents and handles both skill installation and AWS MCP Server connection configuration at once.
% aws configure agent-toolkit --region us-east-1
Detecting installed AI coding agents...
✓ Claude Code — ~/.claude/skills
✗ Cline — ~/.cline/skills (not found)
✓ Codex — ~/.agents/skills/
✓ Cursor — ~/.cursor/skills
✓ Gemini CLI — ~/.agents/skills/
✓ Kiro — ~/.kiro/skills
✗ OpenClaw — ~/.openclaw/skills (not found)
✗ OpenCode — ~/.agents/skills (not found)
✗ Pi — ~/.pi/agent/skills (not found)
✗ Windsurf — ~/.agents/skills (not found)
Select agents to configure (space to toggle, up/down arrows to navigate, enter t
o confirm):
[x] Claude Code — ~/.claude/skills
[x] Codex — ~/.agents/skills/
[x] Cursor — ~/.cursor/skills
[x] Gemini CLI — ~/.agents/skills/
[x] Kiro — ~/.kiro/skills
The wizard supports multiple agents including Kiro, Cursor, and Claude Code.
Note that agents with access to the AWS MCP Server can also discover and load skills at runtime without prior installation.
Inside Redshift Skills
Redshift skills are published as open source on GitHub, so you can examine their contents. This was the most interesting part of this update.
Checking the Skill Catalog
The aws agent-toolkit command was added to AWS CLI in version 2.35.0 and later, allowing you to search and install skills. Let's start by searching for Amazon Redshift-related skills. The Agent Toolkit API itself is only available in us-east-1.
% aws agent-toolkit search-skills --search-query "redshift SQL" --region us-east-1
{
"skills": [
{
"name": "redshift-guide",
"description": "Amazon Redshift is NOT PostgreSQL — corrects PostgreSQL-derived LLM mistakes; covers Redshift-specific SQL, DDL, COPY/UNLOAD, system views, metadata discovery, and operational patterns. Applies ONLY when the task is about Redshift itself (cluster, Serverless workgroup, or Redshift SQL). Pushes back on: CREATE INDEX, string_agg, pg_catalog, text type, SERIAL, stl_query, LATERAL, RETURNING. Triggers on: Redshift SQL, Redshift CREATE TABLE, Redshift COPY/UNLOAD, slow Redshift query, Redshift permission denied, Redshift disk full, Redshift system views, QUALIFY, PIVOT, MERGE, Redshift Data API, Redshift WLM, concurrency scaling, Redshift resize, Redshift Spectrum external tables. Does NOT apply to (defer to that service's own skill): Amazon S3 storage/bucket policies, Athena or Glue queries/catalogs, data-lake or Iceberg work outside Redshift, Aurora, RDS, or DynamoDB — but S3/Glue ARE in scope for Redshift COPY, UNLOAD, or data-lake queries (external schemas/tables on S3).",
"skillVersion": "v1",
"categories": []
},
:
:
:
{
"name": "querying-aws-sagemaker-catalog",
"description": "Runs SQL analytics on SageMaker Catalog asset metadata tables exported as Apache Iceberg in S3 Tables. Covers governance queries, asset growth tracking, ownership audits, time-travel over catalog state, and metadata quality analysis. Applies when querying catalog inventory, finding assets without descriptions, comparing catalog snapshots, or auditing data ownership. Trigger phrases: catalog inventory SQL, how many assets, assets without descriptions, asset growth over time, who owns this data, catalog governance, data quality audit, catalog analytics.",
"skillVersion": "v1",
"categories": []
}
]
}
The description for redshift-guide starts with "Amazon Redshift is NOT PostgreSQL." The following text states "Pushes back on: CREATE INDEX, string_agg, pg_catalog, text type, SERIAL, stl_query, LATERAL, RETURNING," making it clear that its purpose is to push back against SQL written by LLMs using PostgreSQL knowledge.
Retrieving Skill Contents
Let's check what files make up the skill.
% aws agent-toolkit get-skill-metadata --skill-name redshift-guide --region us-east-1
{
"name": "redshift-guide",
"skillVersion": "v1",
"description": "Amazon Redshift is NOT PostgreSQL — corrects PostgreSQL-derived LLM mistakes; covers Redshift-specific SQL, DDL, COPY/UNLOAD, system views, metadata discovery, and operational patterns. Applies ONLY when the task is about Redshift itself (cluster, Serverless workgroup, or Redshift SQL). Pushes back on: CREATE INDEX, string_agg, pg_catalog, text type, SERIAL, stl_query, LATERAL, RETURNING. Triggers on: Redshift SQL, Redshift CREATE TABLE, Redshift COPY/UNLOAD, slow Redshift query, Redshift permission denied, Redshift disk full, Redshift system views, QUALIFY, PIVOT, MERGE, Redshift Data API, Redshift WLM, concurrency scaling, Redshift resize, Redshift Spectrum external tables. Does NOT apply to (defer to that service's own skill): Amazon S3 storage/bucket policies, Athena or Glue queries/catalogs, data-lake or Iceberg work outside Redshift, Aurora, RDS, or DynamoDB — but S3/Glue ARE in scope for Redshift COPY, UNLOAD, or data-lake queries (external schemas/tables on S3).",
"categories": [],
"files": [
{
"path": "SKILL.md"
},
{
"path": "references/redshift-sql-ddl-copy.md"
},
{
"path": "references/redshift-sql-extensions-semantics.md"
},
{
"path": "references/redshift-sql-functions-types.md"
},
{
"path": "references/redshift-sql-materialized-views.md"
},
{
"path": "references/redshift-sql-metadata.md"
},
{
"path": "references/redshift-sql-recipes-load-api.md"
},
{
"path": "references/redshift-sql-syntax.md"
}
]
}
The structure consists of the entry point SKILL.md and seven reference files. Individual files can be retrieved with get-skill-file. This command lists the skills installed via the AWS CLI.
Why LLMs Mistake Amazon Redshift for PostgreSQL
When I ran version() as a connectivity check, the answer came back directly.
SELECT version();
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.416217
It self-identifies as "PostgreSQL 8.0.2." It's somewhat understandable that an LLM seeing this string would start writing SQL using PostgreSQL conventions. It also makes sense that the skill explicitly states that SELECT version() cannot distinguish between Serverless and provisioned.
Trying It Out
Prerequisites
- AWS CLI: 2.36.35
- Verification region: ap-northeast-1 (Amazon Redshift), us-east-1 (Agent Toolkit)
- Amazon Redshift Serverless / Amazon Redshift version: 1.0.416217
Does PostgreSQL-Style SQL Work?
Now for the main topic. The reference redshift-sql-syntax.md summarizes in a table the patterns that fail when written with PostgreSQL intuitions. Let's try string_agg first.
SELECT string_agg(v, ',') FROM (SELECT 'a' AS v UNION ALL SELECT 'b') t;
ERROR: function string_agg(character varying, "unknown") does not exist
Hint: No function matches the given name and argument types. You may need to add explicit type casts.
It failed as documented. The alternative suggested by the skill is LISTAGG.
SELECT LISTAGG(v, ',') WITHIN GROUP (ORDER BY v) AS joined
FROM (SELECT 'a' AS v UNION ALL SELECT 'b') t;
joined
a,b
This succeeded.
What About System Views?
redshift-sql-metadata.md states that STL_ and STV_ are limited to provisioned single-AZ, and that the SYS_ family should be used as it works with any configuration. Let's try referencing stl_query in a Serverless workgroup.
SELECT * FROM stl_query LIMIT 1;
ERROR: permission denied for relation stl_query
It was not accessible. However, the error returned was "permission denied" rather than "relation does not exist." The skill's description says it "does not exist" in Serverless, but in practice it surfaces as a permission error. This is a difference worth noting, as an agent seeing only this error might mistakenly interpret it as insufficient permissions.
Let's also check the recommended SYS_ family views.
SELECT query_id, status FROM sys_query_history ORDER BY start_time DESC LIMIT 3;
query_id status
1412360 running
1412359 success
1412358 success
These were accessible without any issues.
Trying Redshift's Proprietary Extension QUALIFY
redshift-sql-extensions-semantics.md has a section called "Extensions LLMs under-use," with QUALIFY listed at the top. It's a syntax that allows filtering on window function results without wrapping them in a subquery.
SELECT v FROM (SELECT 'a' AS v UNION ALL SELECT 'b' UNION ALL SELECT 'c') t
QUALIFY ROW_NUMBER() OVER (ORDER BY v DESC) = 1;
v
c
This avoided having to calculate row_number in a subquery and filter on the outer level.
The Leader-Node-Only Function Trap
SKILL.md states "SUBSTR() is leader-node-only — works on literals but errors on table columns," and even includes the expected error message. First, I tried it with a subquery constructed from constants.
SELECT SUBSTR(v,1,1) FROM (SELECT 'abc' AS v UNION ALL SELECT 'def') t;
substr
a
d
Contrary to expectations, it succeeded. A subquery consisting only of constants is evaluated on the leader node, so it didn't meet the conditions described. I then applied the same function to a column of a system view that actually holds data.
SELECT SUBSTR(status,1,3) AS s FROM sys_query_history LIMIT 1;
ERROR: SUBSTR() function is not supported (Hint: use SUBSTRING instead)
code: 8001
This time it errored. The error message matched exactly what was documented in SKILL.md. This confirmed both that the skill's description is accurate and that verification needs to be done against actual columns.
Let's also try SUBSTRING, which is presented as the alternative.
SELECT SUBSTRING(status,1,3) AS s FROM sys_query_history LIMIT 1;
s
suc
It worked correctly on the same column.
Verifying Comparison Semantics
redshift-sql-syntax.md states regarding trailing whitespace handling: "Two bare literals are NOT equal."
SELECT ('abc ' = 'abc') AS literal_eq;
literal_eq
False
It returned false as documented. The behavioral difference — trailing whitespace is ignored in column comparisons but not in literal-to-literal comparisons — is a point that can easily produce unintended results.
Summary of Verification Results
Here is a summary of what was confirmed.
| Verification item | Skill description | Actual result | Match |
|---|---|---|---|
string_agg |
Not supported | function ... does not exist |
Match |
LISTAGG |
Use as alternative | Success | Match |
stl_query (Serverless) |
Does not exist in Serverless | permission denied |
Mostly match (error content differs) |
sys_query_history |
Works with any configuration | Success | Match |
QUALIFY |
Recommended as proprietary extension | Success | Match |
SUBSTR (system view column) |
Leader-node-only, errors | Error message matched exactly | Match |
SUBSTRING |
Use as alternative | Success | Match |
| Trailing whitespace comparison in literals | Not equal | false |
Match |
Note: The behavior where text type becomes VARCHAR(256) and the absence of CREATE INDEX were not verified in this read-only verification, as they require CREATE TABLE.
Discussion
Here are some observations from the verification.
-
The accuracy of the skill content is high
In particular, the
SUBSTRerror matched the actual machine output down to the exact error message wording. The content captures where LLM-generated SQL tends to fail at the level of actual error strings. -
Care is needed in setting verification conditions
When I tried
SUBSTRwith a subquery containing only constants, it succeeded, and the issue only reproduced against a column with actual data. The skill description was accurate, but misreading its conditions could lead to incorrect conclusions. -
Region constraints
The
aws agent-toolkitcommand is only available in us-east-1, and at the time of writing, the AWS MCP Server endpoints are also limited to two: us-east-1 and eu-central-1. However, this refers to the connection destination, and the target region for operations can be specified separately. When working with Amazon Redshift in the Tokyo region, specify theAWS_REGIONmetadata parameter in the MCP Server configuration. -
stl_queryerror returns aspermission deniedThe skill description says it "does not exist" in Serverless, and the remediation leads to the same conclusion, but there may be cases where the difference matters when trying to isolate the cause from the error message.
Note that SKILL.md also defines Safety Guardrails with three levels of control: blocking DROP DATABASE and DELETE without a WHERE clause, and warning and requiring confirmation for RESIZE and VACUUM. However, these are instructions on the skill side, and the actual AWS API execution is carried out by the IAM permissions held by the AWS MCP Server. It is also recommended to restrict permissions on the IAM policy side.
Looking ahead, it would be useful to have samples that make it easier to verify behaviors involving the text type and DDL operations, as well as alignment with Serverless-specific error messages.
Closing
Amazon Redshift has been integrated with Agent Toolkit for AWS, enabling construction, querying, troubleshooting, and migration of Amazon Redshift from Claude Code, Kiro, and Cursor. There are no additional charges, no infrastructure changes required, and it supports both provisioned clusters and Amazon Redshift Serverless.
Rather than being a simple API integration, what I feel is the essence of this update is that officially provided knowledge now corrects mistakes that LLMs are prone to making, based on the premise that "Amazon Redshift is not PostgreSQL." If you have experienced writing Redshift SQL with an AI agent and having it not work as expected, why not start by trying the aws-data-analytics plugin?
