К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

connecting-to-data-source — скилл Claude Code для AWS Glue

Создаёт подключение AWS Glue к внешней базе — Oracle, PostgreSQL, Redshift, Snowflake или BigQuery — и проверяет его тестом перед передачей в работу.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add aws/agent-toolkit-for-aws --skill connecting-to-data-source -a claude-code
Открыть на GitHub

Что делает connecting-to-data-source

Скилл ведёт агента по шагам: спросить у вас имя подключения, хост и порт, поискать уже готовое подключение в аккаунте и подходящий кластер RDS, Aurora или Redshift, затем выполнить aws glue create-connection. Пароли в чат не попадают: креды уходят в Secrets Manager или в IAM-аутентификацию базы.

Приватные источники требуют PhysicalConnectionRequirements — подсеть, security groups, зона доступности. Тест идёт в две фазы. Сначала aws glue test-connection: сеть и логин. Потом проверка на уровне движка: smoke-тест джобы на одной строке, SELECT 1 через Athena или пробный crawl одной таблицы. Вторая фаза ловит то, что первый тест пропускает: драйвер в рантайме, настройки каталога, авторизацию в Snowflake.

Нужен доступ к AWS MCP-серверу или AWS CLI, подтверждённый регион и рабочие креды из aws sts get-caller-identity — без этого проверка упрётся в первый шаг. Отдельная тонкость: для Spark ETL нужен тип подключения SNOWFLAKE, JDBC с настройками Snowflake на ту же роль не годится. Данные скилл не перемещает и таблицы не создаёт.

Какие задачи решает

  • зарегистрировать базу Oracle как подключение в AWS Glue
  • переиспользовать найденное подключение вместо создания второго
  • разобраться, почему Glue не достаёт источник из своей подсети
  • убрать пароль базы из кода и положить его в Secrets Manager
  • убедиться, что Snowflake читается из Spark-джобы, а не только по API

Примеры запросов агенту

  • Подключи Postgres из RDS к AWS Glue, креды положи в Secrets Manager
  • Тест подключения к Redshift отваливается по таймауту — пройди по шагам и починь
  • Проверь готовое подключение oracle-prod-sales перед запуском джобы

Как установить connecting-to-data-source

1Через Skills CLI (Vercel)

npx skills add aws/agent-toolkit-for-aws --skill connecting-to-data-source -a claude-code

2Вручную: положить файлы

~/.claude/skills/connecting-to-data-source/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/connecting-to-data-source/

Из того же набора8

Весь набор →
aws-iam aws Проверенные поправки к типичным ошибкам агентов в AWS IAM плюс рабочие процессы для ролей и baseline-политик. Claude Code CX Codex Cursor +1 10 200установок aws-serverless aws Скилл-маршрутизатор для serverless на AWS: выбирает форму вычислений под каждый компонент приложения и передаёт работу профильным скиллам. Claude Code CX Codex Cursor +1 10 100установок aws-cdk aws Скилл для Claude Code, который учит агента писать и деплоить инфраструктуру AWS на CDK на TypeScript и Python — от конструкций до импорта ресурсов и разбора ошибок CloudFormation. Claude Code CX Codex Cursor +1 9 400установок aws-containers aws Разворачивает контейнеры на AWS: EKS, ECS, Fargate, ECR и Elastic Beanstalk. Пригодится при деплое, отладке и оптимизации контейнерных сервисов. Claude Code CX Codex Cursor +1 9 300установок aws-billing-and-cost-management aws Анализирует расходы в AWS, ищет резервы экономии и настраивает бюджеты. Помогает проверить аномалии цен, оценить Savings Plans и снизить затраты на инфраструктуру. Claude Code CX Codex Cursor +1 8 900установок aws-cloudformation aws Ведёт шаблоны CloudFormation от написания до разбора упавших стеков: валидация, проверки cfn-guard и поиск причины сбоя по событиям и CloudTrail. Claude Code CX Codex Cursor +1 8 800установок querying-data-lake aws Скилл запускает SQL в Amazon Athena: выбирает рабочую группу, останавливает разрушительные запросы на подтверждение и показывает цену прогона. Claude Code CX Codex Cursor +1 6 600установок

Похожие

managed-agent ruvnet Скилл для запуска Claude Managed Agents в облаке Anthropic. Подходит для долгих асинхронных задач в изолированном контейнере с постоянной файловой системой. Claude Code CX Codex Cursor +1 596установок aws-solution-architect Alireza Rezvani Проектирует архитектуру AWS, генерирует шаблоны IaC и разбирает расходы. Пригодится при запуске серверлес-приложения, миграции или настройке CI/CD. Claude Code 1 586установок vercel-sandbox официальный Vercel Labs Скилл запускает пользовательский и сгенерированный код в изолированной Vercel Sandbox. Он пригодится для браузерной автоматизации и проверки кода без запуска в основном окружении. CX Codex GP ChatGPT 27установок workers-best-practices cloudflare Скилл настраивает ИИ на проверку продакшен-кода Cloudflare Workers по актуальным правилам рантайма, типам Wrangler и антипаттернам. Claude Code CX Codex Cursor +1 124 900установок cloudflare-email-service cloudflare Скилл для работы с Cloudflare Email Sending и Email Routing: помогает настроить отправку и приём писем в Workers. Claude Code CX Codex Cursor +1 101 400установок firebase-basics официальный google Скилл настраивает Firebase CLI, помогает войти в аккаунт, создать или выбрать проект и скачать конфигурацию Android или iOS. Claude Code Gemini CLI CX Codex 14 100установок cloudflare-one cloudflare Помогает агенту проектировать, настраивать и разбирать развёртывания Cloudflare One Zero Trust и SASE. Пригодится, когда нужно спланировать Access, Gateway или туннели без похода в документацию вручную. Claude Code CX Codex Cursor +1 92 200установок cloudflare-one-migrations cloudflare Помогает спланировать переход с VPN, SWG или SASE на Cloudflare One: сопоставляет политики, находит пробелы и расписывает порядок выката. Claude Code CX Codex Cursor +1 88 700установок

Вопросы о connecting-to-data-source

Как установить connecting-to-data-source в Claude Code?

Одной командой: npx skills add aws/agent-toolkit-for-aws --skill connecting-to-data-source -a claude-code. Файл скилла окажется по пути ~/.claude/skills/connecting-to-data-source/SKILL.md.

Что делает connecting-to-data-source?

Создаёт подключение AWS Glue к JDBC-базе, Redshift, Snowflake или BigQuery и доводит его до рабочего состояния: собирает параметры у вас, регистрирует креды, настраивает сеть, тестирует. Полученное имя подключения потом использует ingesting-into-data-lake.

Скилл сам переносит данные?

Нет. Он делает именованный канал до источника и на этом останавливается. Перемещение данных, создание таблиц, запросы и разбор каталога — задачи соседних скиллов, а DynamoDB Glue читает напрямую без подключения.

Исходный текст

SKILL.md · Apache-2.0
---
name: connecting-to-data-source
description: >-
  Create and troubleshoot AWS Glue connections to JDBC databases (Oracle, SQL Server,
  PostgreSQL, MySQL, RDS), Redshift, Snowflake, and BigQuery. Gathers connection hints
  from user, discovers existing connections and RDS/Redshift candidates, registers
  credentials in Secrets Manager or IAM DB auth, configures VPC, and tests. Triggers
  on: connect to database, set up Glue connection, register data source, connect to
  Snowflake/BigQuery/RDS, connection timeout, test connection, troubleshoot connection.
  Do NOT use for moving data (use ingesting-into-data-lake), creating tables (use
  creating-data-lake-table), queries (use querying-data-lake), catalog exploration
  (use exploring-data-catalog), or SaaS (Salesforce, ServiceNow, SAP, MongoDB, Kafka).
metadata:
  version: "1"
  argument-hint: "'[source-type|connection-name|hostname]'"
---

# Connect to Data Source

Register an external data source with AWS Glue so downstream skills (ingesting-into-data-lake) can move data from it. A Glue connection stores the network config, driver, and credential reference for one source. Create once per source, reuse across jobs.

## Philosophy

**A connection is a named pipe, not a pipeline.** This skill produces a tested, reusable Glue connection. It does not move data.

## Common Tasks

You MUST execute commands using AWS MCP server tools when connected -- they provide validation, sandboxed execution, and audit logging. Fall back to AWS CLI only if MCP is unavailable. You MUST explain each step before executing.

## Workflow

### 1. Verify Dependencies and Context

- You MUST check whether AWS MCP tools or AWS CLI are available and inform the user if missing
- You MUST confirm target AWS region and verify credentials with `aws sts get-caller-identity`

### 2. Classify the Source

Ask the user which source type they want to connect to, or infer from hints:

| User says... | Source type | Connection type | Reference |
|---|---|---|---|
| "Oracle", "SQL Server", "Postgres", "MySQL", "RDS \<engine\>" | JDBC database | `JDBC` | [jdbc-setup.md](references/jdbc-setup.md) |
| "Redshift", "my cluster", "my data warehouse on AWS" | Redshift | `JDBC` | [jdbc-setup.md](references/jdbc-setup.md) (Redshift section) |
| "Snowflake" | Snowflake | `SNOWFLAKE` | [snowflake-setup.md](references/snowflake-setup.md) |
| "BigQuery", "Google analytics warehouse" | BigQuery | `BIGQUERY` | [bigquery-setup.md](references/bigquery-setup.md) |

If the user names DynamoDB or a local file, stop and tell them: DynamoDB is read directly by Glue without a connection, and local files belong in the ingesting-into-data-lake skill's local-upload workflow.

### 3. Gather Connection Hints from the User

You MUST ask for hints the user can provide -- do not guess.

**For all sources:**

- Desired connection name (lowercase, hyphens: `oracle-prod-sales`, `snowflake-analytics`)
- Existing Secrets Manager secret, or create one
- Is source reachable from a Glue VPC (same, peered, VPN, Direct Connect)

**JDBC:** hostname/endpoint, port, database, whether RDS/Aurora/self-managed, IAM DB auth enabled (Aurora/RDS MySQL/Postgres), SSL required.

**Snowflake:** account identifier, warehouse, role, default database, auth (password, key-pair, OAuth).

**BigQuery:** GCP project ID, location, whether service account JSON is provisioned.

### 4. Discover Existing Connections and Candidate Sources

Check what exists before creating.

**Existing Glue connections:**

```bash
aws glue get-connections --filter ConnectionType=<TYPE> --region <REGION>
```

If a suitable one exists, confirm and skip to Step 7.

**Candidate sources in account** (JDBC/Redshift only):

- RDS: `aws rds describe-db-instances`
- Aurora: `aws rds describe-db-clusters`
- Redshift: `aws redshift describe-clusters`

Present candidates to user; let them pick. See [discovery.md](references/discovery.md).

### 5. Register Credentials

You MUST encourage AWS Secrets Manager over plaintext passwords. You SHOULD prefer IAM database authentication where supported (Aurora/RDS MySQL and PostgreSQL, Redshift). See [credential-security.md](references/credential-security.md).

- You MUST confirm with user before creating a new Secrets Manager secret
- You MUST NOT write plaintext credentials into chat or logs
- For IAM DB auth, no secret is needed

### 6. Create the Glue Connection

Follow the source-specific reference for connection properties:

```bash
aws glue create-connection --connection-input '<JSON>' --region <REGION>
```

Private sources require `PhysicalConnectionRequirements` (SubnetId, SecurityGroupIdList, AvailabilityZone). See [network-setup.md](references/network-setup.md).

### 7. Test the Connection

You MUST test before handing off. Testing is two-phase: a quick API check, then an engine-level verification.

#### Phase A: Glue TestConnection (network and credential sanity check)

```bash
aws glue test-connection --connection-name <NAME> --region <REGION>
```

This validates that Glue can reach the source and authenticate. It does NOT prove the connection works end-to-end with the query engine the user plans to use.

#### Phase B: Engine-level verification

After TestConnection passes, verify the connection works with the user's intended engine by running a minimal query through it:

- **Glue ETL (default):** Run a smoke-test Glue job that reads one row via the connection. See [troubleshooting.md](references/troubleshooting.md).
- **Athena:** If the user plans to query via Athena with a federated connector, run a `SELECT 1` through the Athena connection to confirm the Lambda-based connector can reach the source.
- **Glue Crawler:** If the user plans to crawl the source, run a test crawl on a single table.

Phase B catches issues that TestConnection misses: driver compatibility at job runtime, catalog configuration, Spark-level serialization, and engine-specific auth flows (e.g., Snowflake SNOWFLAKE type works in ETL but not via JDBC crawlers).

On success in both phases, tell user the connection name is ready for `ingesting-into-data-lake`. On failure in either phase, Step 8.

### 8. Troubleshoot (only if test failed)

Diagnose in order: network, credentials, driver. See [troubleshooting.md](references/troubleshooting.md).

**Constraints:**

- You MUST check VPC routing, security groups, and S3 VPC endpoint before blaming credentials
- You MUST verify Glue role can read the Secrets Manager secret
- You MUST NOT rotate credentials without user confirmation

## Argument Routing

- No args: Walk through Steps 1-7 interactively
- Source type keyword (e.g., `snowflake`, `oracle`): Skip to Step 2 with the type prefilled
- Existing connection name: Skip to Step 7 (test) then Step 8 if failing
- Hostname or RDS endpoint: Skip to Step 4 with the candidate prefilled

## Gotchas

- Glue's `SNOWFLAKE` connection type is distinct from `JDBC` configured for Snowflake. You MUST use `SNOWFLAKE` for Spark ETL jobs; do not use JDBC.
- Connection names are immutable. Choose carefully.
- `PhysicalConnectionRequirements.AvailabilityZone` MUST match the subnet's AZ or the connection fails at job runtime, not creation time.
- IAM database authentication tokens expire in 15 minutes. The Glue job generates a fresh token on each connection; do not cache.
- An S3 VPC gateway endpoint MUST exist in the VPC used by private-source connections. Without it, Glue jobs cannot read their scripts or write results to S3.

## Troubleshooting

| Error | Likely cause | Fix |
|---|---|---|
| `Connect timed out` | VPC routing, SG rule, or NAT gateway missing | See [troubleshooting.md](references/troubleshooting.md) |
| `Access denied for user` / `ORA-01017` | Credentials wrong, Secrets Manager access missing, or IAM DB auth misconfigured | See [troubleshooting.md](references/troubleshooting.md) |
| `No suitable driver found` | Custom driver JAR not set or wrong class name | See [troubleshooting.md](references/troubleshooting.md) |
| `SSL handshake failed` | `JDBC_ENFORCE_SSL` mismatch between Glue and source | See [troubleshooting.md](references/troubleshooting.md) |
| `UnableToFindVpcEndpoint` | S3 VPC endpoint missing | Create S3 gateway endpoint in the connection's VPC |

## References

- [jdbc-setup.md](references/jdbc-setup.md) -- Oracle, SQL Server, PostgreSQL, MySQL, RDS, Redshift
- [snowflake-setup.md](references/snowflake-setup.md) -- Glue `SNOWFLAKE` type, auth modes
- [bigquery-setup.md](references/bigquery-setup.md) -- Glue `BIGQUERY` type, GCP service accounts
- [discovery.md](references/discovery.md) -- Finding existing connections and candidate sources
- [credential-security.md](references/credential-security.md) -- Secrets Manager and IAM DB auth
- [network-setup.md](references/network-setup.md) -- VPC, subnets, security groups, endpoints
- [troubleshooting.md](references/troubleshooting.md) -- Connection errors and diagnostic flow

© aws · Apache-2.0 · aws/agent-toolkit-for-aws

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой