New to Kestra?
Use blueprints to kickstart your first workflows.
Orchestrate an AWS Glue ETL job, validate the curated output with an Athena query, and cache the KPI in DynamoDB for low-latency reads with Kestra.
Stitch AWS Glue, Athena, and DynamoDB into a single governed data pipeline that runs an ETL job, validates its output, and publishes a ready-to-read metric. This blueprint solves a common gap in serverless analytics: Glue, Athena, and DynamoDB each have their own APIs and no shared scheduler, so chaining them reliably means writing glue code, polling for completion, and handling failures by hand. Here, Kestra coordinates the whole flow declaratively and only writes the KPI once the data has actually passed validation.
run_glue_job (io.kestra.plugin.aws.glue.StartJobRun) starts your Glue ETL job by name and, with wait: true, blocks until the job reaches a terminal state. A Glue failure stops the pipeline before any downstream task runs.validate_with_athena (io.kestra.plugin.aws.athena.Query) runs a FETCH_ONE query against the curated table to read the headline metrics (row count and total amount) and confirm the ETL produced data.write_kpi (io.kestra.plugin.aws.dynamodb.PutItem) caches the computed KPI in DynamoDB under a date-stamped kpi_id, capturing the Athena metrics and the Glue job state for fast application reads.notify (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) posts the Glue state and row count to Slack.io.kestra.plugin.core.trigger.Schedule trigger (cron: 0 4 * * *) is included for daily runs once you enable it.Glue, Athena, and DynamoDB have no shared scheduler that can sequence a job, gate on its result, and write derived data in one place. Kestra fills that gap: event or schedule triggers start the run, retries and error handling keep it resilient, execution outputs give you lineage across the three services, and the whole pipeline is declarative YAML you can version and review. The wait: true gate ensures Athena and DynamoDB never run on a half-finished Glue job, something Glue's own job scheduling cannot enforce across services.
An existing Glue job, an Athena database with a curated table, an S3 results location, and a DynamoDB table.
AWS_ACCESS_KEY_ID: AWS access key with Glue, Athena, S3, and DynamoDB permissions.AWS_SECRET_ACCESS_KEY: matching AWS secret access key.AWS_DEFAULT_REGION: AWS region for all three services.SLACK_WEBHOOK_URL: Slack incoming webhook URL for run notifications.glue_job_name, athena_database, athena_output_location, and dynamodb_table inputs.validate_with_athena to match your curated schema.daily_pipeline schedule.run_glue_job for transient AWS failures.