Sync new Amazon S3 files to Amazon Redshift

Developer ToolDatabase

What it does

When a new file lands in Amazon S3, this automation downloads the file contents and upserts the data into a staging table in Amazon Redshift. The batch is ready for analysis without manual intervention.

Who it's for

Data and analytics teams who need to load Amazon S3 files into Redshift for reporting and analysis.

How teams use this

Load daily reports into the warehouse

Drop a daily report file into Amazon S3 and have it automatically land in Redshift for the analytics team to query. No manual export or import steps are needed.

Route files to different staging tables

Extend this automation to check the file name or type and upsert into different Redshift tables based on the source. Only the condition and table mapping change.

Alert operations when data arrives

Add a notification after the upsert completes so the operations team knows fresh data is ready in Redshift for downstream processes. The core sync stays the same.

Validate data before loading

Include a data quality check between the download and upsert steps to filter out incomplete or malformed records. Only valid rows are inserted into Redshift.

How it works

  1. Detect new file in Amazon S3. Monitor an Amazon S3 bucket for new files. When one arrives, this automation starts and passes the file details downstream.
  2. Download file contents from Amazon S3. Retrieve the full contents of the new file from Amazon S3 so the data is ready to load into the data warehouse for processing.
  3. Upsert batch into staging table. Insert or update rows in the staging.new_analysis table in Amazon Redshift with the downloaded file data in a single batch operation.