$npx -y skills add aws/agent-toolkit-for-aws --skill ingesting-into-data-lakeImport data into the AWS data lake from S3 files, local uploads, JDBC databases (Oracle, SQL Server, PostgreSQL, MySQL, RDS, Aurora), Amazon Redshift, Snowflake, BigQuery, DynamoDB, or existing Glue catalog tables (migration). Default target is S3 Tables; standard Iceberg on a ge
| 1 | # Ingest into Data Lake |
| 2 | |
| 3 | Move data from a source into a queryable table in the data lake. This skill assumes the source connection (if one is needed) already exists. For Glue connection setup or troubleshooting, delegate to `connecting-to-data-source`. |
| 4 | |
| 5 | ## Philosophy |
| 6 | |
| 7 | **Default to S3 Tables unless the environment says otherwise.** S3 Tables is the recommended target for new data lake work. If the user's catalog inventory shows they haven't adopted S3 Tables, recommend standard Iceberg on their existing general-purpose bucket instead of forcing them to change posture. |
| 8 | |
| 9 | ## Common Tasks |
| 10 | |
| 11 | 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. |
| 12 | |
| 13 | ## Workflow |
| 14 | |
| 15 | ### 1. Verify Dependencies and Context |
| 16 | |
| 17 | - You MUST check whether AWS MCP tools or AWS CLI are available and inform the user if missing |
| 18 | - You MUST confirm target AWS region and verify credentials with `aws sts get-caller-identity` |
| 19 | - For SageMaker Unified Studio project roles, note that target tables and connections may be scoped to the project. See the caller ARN detection pattern in `querying-data-lake`. |
| 20 | |
| 21 | ### 2. Classify the Source |
| 22 | |
| 23 | | User says... | Source type | Reference | |
| 24 | |---|---|---| |
| 25 | | "upload my file", "local CSV", "move to S3" | Local file | [local-upload.md](references/local-upload.md) | |
| 26 | | "load from S3", "import CSV/JSON/Parquet from s3://" | S3 files | [s3-files.md](references/s3-files.md) | |
| 27 | | "import from Oracle/Postgres/MySQL/SQL Server/Redshift/RDS/Aurora" | JDBC | [jdbc-ingest.md](references/jdbc-ingest.md) | |
| 28 | | "pull from Snowflake", "Snowflake table to S3" | Snowflake | [snowflake-ingest.md](references/snowflake-ingest.md) | |
| 29 | | "import from BigQuery", "GCP analytics to S3" | BigQuery | [bigquery-ingest.md](references/bigquery-ingest.md) | |
| 30 | | "export DynamoDB", "DynamoDB to data lake" | DynamoDB | [dynamodb-ingest.md](references/dynamodb-ingest.md) | |
| 31 | | "migrate Glue table", "convert Hive to Iceberg" | Catalog migration | [catalog-migration.md](references/catalog-migration.md) | |
| 32 | |
| 33 | If the user names Salesforce, ServiceNow, SAP, MongoDB, Kafka, or another SaaS/streaming source, decline -- these are not supported in this release. |
| 34 | |
| 35 | If the source table is referenced by a fuzzy or business name ("migrate our orders table", "pull from the sales warehouse"), delegate to `finding-data-lake-assets` to resolve before proceeding. |
| 36 | |
| 37 | ### 3. Confirm Connection Exists (if applicable) |
| 38 | |
| 39 | For JDBC, Snowflake, and BigQuery sources, a Glue connection is required. Check: |
| 40 | |
| 41 | ```bash |
| 42 | aws glue get-connection --name <CONNECTION_NAME> --region <REGION> |
| 43 | ``` |
| 44 | |
| 45 | If the connection does not exist, stop and delegate to `connecting-to-data-source` to create and test it. Do not proceed with ingest until the connection is verified. |
| 46 | |
| 47 | Local files, S3 files, DynamoDB, and catalog migration do not need a Glue connection. |
| 48 | |
| 49 | ### 4. Clarify the Target |
| 50 | |
| 51 | You MUST ask the user (or suggest based on catalog inventory) before creating or writing to any table: |
| 52 | |
| 53 | - **Database/namespace**: Does a specific target database exist? Or should one be created? |
| 54 | - **Table**: Existing table (append/merge) or new table (delegate to `creating-data-lake-table`)? |
| 55 | - **Format**: S3 Tables (default), standard Iceberg, or raw Parquet? |
| 56 | |
| 57 | **Inventory-aware defaults:** |
| 58 | |
| 59 | If you have already run `exploring-data-catalog` or can quickly check, use what exists: |
| 60 | |
| 61 | - Account has an `s3tablescatalog` federated catalog and active table buckets: recommend S3 Tables |
| 62 | - Account has general-purpose buckets with Iceberg tables and no S3 Tables usage: recommend standard Iceberg on their existing bucket |
| 63 | - Account uses Parquet/ORC on S3 without Iceberg metadata: ask whether to adopt Iceberg now (recommend yes) or continue with raw files |
| 64 | |
| 65 | Do no |