Automating reports in Redshift means using stored procedures plus AWS scheduling services to run SQL and persist or export results without manual effort.
Automated reports remove manual query runs, guarantee fresh metrics, and cut compute costs by materializing lightweight result tables that BI tools read instead of heavy joins.
Use a PL/pgSQL stored procedure for the reporting logic, then trigger it with Amazon EventBridge + Redshift Data API for fully managed scheduling.
CREATE OR REPLACE PROCEDURE, a LANGUAGE plpgsql block, and a CALL statement execute the logic. See the Syntax section below.
Create an EventBridge cron rule and add a Redshift Data API target that calls the stored procedure. No Lambda is required.
Add an UNLOAD command inside the procedure or a second procedure: UNLOAD 'SELECT * FROM reporting.daily_sales_report' TO 's3://company-reports/daily/' IAM_ROLE 'arn:aws:iam::123:role/redshift-s3' PARALLEL OFF CSV GZIP;
The example_query section shows a full stored procedure that builds a daily sales table from Orders, OrderItems, and Products, then schedules it for 06:00 UTC every day.
Keep procedures idempotent, store reports in a dedicated reporting schema, log runtimes with RAISE INFO, and grant SELECT-only permissions to analysts.
See the Common Mistake fields below for details on permission issues and duplicate data.
Yes. Store cron expressions in a config table and update the EventBridge rule with aws events put-rule during deployments.
No. Lambda is optional. EventBridge calling the Redshift Data API is enough unless you need preprocessing or cross-cluster orchestration.
Yes. Call several stored procedures in a wrapper procedure, then schedule the wrapper so you manage just one EventBridge rule.
Compute time is the same as running queries manually. Because procedures often materialize results into narrow tables, downstream queries run faster, lowering overall cost.
Enable EventBridge rule targets for dead-letter queues or CloudWatch alarms. Inside the procedure, RAISE EXCEPTION messages appear in STL_QUERY and can trigger SNS alerts.