Ingestion: dlt + lambda
Last updated
pipelines/
├── chess_lambda.tf # Terraform creating the lambda function and ECR repository
├── ingestion_bucket.tf # Terraform creating S3 bucket
└── ingest/
└── chess-ingestion/ # Lambda function code
├── Dockerfile
├── lambda_handler.py # Lambda code with DLT pipeline
└── ...
└── chess-schema/ # Iceberg schema definition in Glue Catalog
├── table_schema.py
└── ...{source_name}/raw/{table_name}/{load_id}.{file_id}.{ext}{source_name}/landing/{table_name}/DESTINATION=duckdb
# Add any source-specific credentials heremake run-localDESTINATION=filesystem
AWS_REGION=<your-aws-region>
S3_BUCKET_NAME=<your-s3-bucket-name>
AWS_PROFILE=<your-aws-profile>
# Add any source-specific credentials heremake run-localexport AWS_PROFILE=<your_profile>
make run-lambda env=<your_environment>{
"name": "Debug chess lambda",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/pipelines/ingest/chess-ingestion/lambda_handler.py",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}/pipelines/ingest/chess-ingestion",
"justMyCode": false
}cd pipelines/
uvx boringdata dlt get-schema chess# Set required environment variables
export AWS_PROFILE=<your_profile>
# Build and deploy
make deploy env=<your_environment># Development
make run-local # Run locally with settings from .env.local
make run-lambda env=<environment> # Execute on AWS Lambda
# Deployment
make build env=<environment> # Build Docker image
make deploy env=<environment> # Build and deploy to ECR
# Utilities
make help # Show all available commands