Analytics Skills
Skill 50 of 131
Create and troubleshoot AWS Glue connections to JDBC databases (Oracle, SQL Server, PostgreSQL, MySQL, RDS), Redshift, Snowflake, and BigQuery.
4 minutes · 922 words · 18 sections
Install
npx skills add aws/agent-toolkit-for-aws --skill connecting-to-data-sourcenpx skills add aws/agent-toolkit-for-aws/plugin marketplace add aws/agent-toolkit-for-awsThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
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.
A connection is a named pipe, not a pipeline. This skill produces a tested, reusable Glue connection. It does not move data.
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.
aws sts get-caller-identityAsk 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 (opens in a new tab) |
| “Redshift”, “my cluster”, “my data warehouse on AWS” | Redshift | JDBC | jdbc-setup.md (opens in a new tab) (Redshift section) |
| “Snowflake” | Snowflake | SNOWFLAKE | snowflake-setup.md (opens in a new tab) |
| “BigQuery”, “Google analytics warehouse” | BigQuery | BIGQUERY | bigquery-setup.md (opens in a new tab) |
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.
You MUST ask for hints the user can provide – do not guess.
For all sources:
oracle-prod-sales, snowflake-analytics)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.
Check what exists before creating.
Existing Glue connections:
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):
aws rds describe-db-instancesaws rds describe-db-clustersaws redshift describe-clustersPresent candidates to user; let them pick. See discovery.md (opens in a new tab).
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 (opens in a new tab).
Follow the source-specific reference for connection properties:
aws glue create-connection --connection-input '<JSON>' --region <REGION>Private sources require PhysicalConnectionRequirements (SubnetId, SecurityGroupIdList, AvailabilityZone). See network-setup.md (opens in a new tab).
You MUST test before handing off. Testing is two-phase: a quick API check, then an engine-level verification.
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.
After TestConnection passes, verify the connection works with the user’s intended engine by running a minimal query through it:
SELECT 1 through the Athena connection to confirm the Lambda-based connector can reach the source.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.
Diagnose in order: network, credentials, driver. See troubleshooting.md (opens in a new tab).
Constraints:
snowflake, oracle): Skip to Step 2 with the type prefilledSNOWFLAKE connection type is distinct from JDBC configured for Snowflake. You MUST use SNOWFLAKE for Spark ETL jobs; do not use JDBC.PhysicalConnectionRequirements.AvailabilityZone MUST match the subnet’s AZ or the connection fails at job runtime, not creation time.| Error | Likely cause | Fix |
|---|---|---|
Connect timed out | VPC routing, SG rule, or NAT gateway missing | See troubleshooting.md (opens in a new tab) |
Access denied for user / ORA-01017 | Credentials wrong, Secrets Manager access missing, or IAM DB auth misconfigured | See troubleshooting.md (opens in a new tab) |
No suitable driver found | Custom driver JAR not set or wrong class name | See troubleshooting.md (opens in a new tab) |
SSL handshake failed | JDBC_ENFORCE_SSL mismatch between Glue and source | See troubleshooting.md (opens in a new tab) |
UnableToFindVpcEndpoint | S3 VPC endpoint missing | Create S3 gateway endpoint in the connection’s VPC |
SNOWFLAKE type, auth modesBIGQUERY type, GCP service accountsCreate 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).
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
skills/specialized-skills/analytics-skills/connecting-to-data-source/SKILL.mdmain, last pushed 24 September 2026.SKILL.md, not by matching a directory convention. 19 distinct layouts observed: plugins/aws-agents-for-devsecops/skills/*/SKILL.md, plugins/aws-agents/skills/*/SKILL.md, plugins/aws-core/skills/*/SKILL.md, skills/core-skills/*/SKILL.md, skills/specialized-skills/analytics-skills/*/SKILL.md, skills/specialized-skills/database-skills/*/SKILL.md, skills/specialized-skills/ec2-skills/*/SKILL.md, skills/specialized-skills/end-user-computing-skills/*/SKILL.md, skills/specialized-skills/messaging-and-streaming-skills/*/SKILL.md, skills/specialized-skills/migration-and-modernization-skills/*/SKILL.md, skills/specialized-skills/networking-and-content-delivery-skills/*/SKILL.md, skills/specialized-skills/operations-skills/*/SKILL.md, skills/specialized-skills/quantum-computing-skills/*/SKILL.md, skills/specialized-skills/resilience-skills/*/SKILL.md, skills/specialized-skills/security-and-identity-skills/*/SKILL.md, skills/specialized-skills/serverless-skills/*/SKILL.md, skills/specialized-skills/storage-skills/*/SKILL.md, skills/specialized-skills/system-table-skills/*/SKILL.md, skills/specialized-skills/web-and-mobile-development/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by Amazon Web Services, declaring 4 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree./aws/agent-toolkit-for-aws.md, and each skill at its own .md URL.7 files · 28 KB
Everything this skill ships beside its prose. All of it is set here, as subchapters of skill 50.
Documentation the agent loads on demand, rather than up front.