How awslabs/amazon-redshift-utils works
This repository is a collection of Amazon Redshift operations utilities, not one integrated application. The principal end-to-end workflow is Simple Replay: collect and parse workload activity, replay SQL, and inspect replay results through analysis and reporting tools. Other major branches cover cluster performance and maintenance, data migration, identity/permission migration, and scheduled automation. The README documents product-level behavior; source-index references and excerpts support only a subset of internal calls, so uncertain wiring is omitted.
Main entry points: lambda_function.py Utility automation · extractor.py Activity extraction · redshift_unload_copy.py Unload and copy · tasks.py Transfer task manager
Components 25
Workload replay
- Activity extraction
src/SimpleReplay/extract/extractor/extractor.py - Audit parsing
src/SimpleReplay/audit_logs_parsing.py - Log validation
src/SimpleReplay/log_validation.py - Workload replay
src/SimpleReplay/replay.py - Replay analysis
src/SimpleReplay/replay_analysis.py - Analysis API
src/SimpleReplay/api/app.py - Analysis interface
src/SimpleReplay/gui/src/pages/analysis.js - Replay reports
src/SimpleReplay/report_gen.py - External object replication
src/SimpleReplay/external_object_replicator
Cluster operations
- Column encoding
src/ColumnEncodingUtility/analyze-schema-compression.py - Analyze and vacuum
src/AnalyzeVacuumUtility/lib/analyze_vacuum.py - System stats snapshots
src/SystemTablePersistence/snapshot_system_stats.py - WLM scheduler
src/WorkloadManagementScheduler/wlm_scheduler.py
Data migration
- COPY manifests
src/ManifestGenerator/manifestgen.py - Unload and copy
src/UnloadCopyUtility/redshift_unload_copy.py - Transfer task manager
src/UnloadCopyUtility/util/tasks.py - Cluster resources
src/UnloadCopyUtility/util/resources.py - Metadata transfer
src/MetadataTransfer/metadatacopy.py - Multi-table restore
src/MultipleTableRestoreUtility/multitablerestore.py
Identity and permissions
- Lake Formation migration
src/LakeFormationMigrationUtility/rs_privs_to_lf.py - IDC migration
src/RedshiftIDCMigrationUtility
Scheduled automation
- QMR notifications
src/QMRNotificationUtility/lambda/lambda_function.py - Utility automation
src/RedshiftAutomation/lambda_function.py - Shared configuration
src/config_constants.py
Other components
- Operator
Connections 25
- Operator → Activity extraction: collects workload
- Activity extraction → Audit parsing: parses activity
- Activity extraction → Log validation: validates logs
- Operator → Workload replay: replays SQL
- Operator → Replay analysis: analyzes results
- Operator → Analysis interface: views results
- Operator → Replay reports: generates reports
- Operator → External object replication: replicates objects
- Operator → Column encoding: optimizes encoding
- Operator → Analyze and vacuum: maintains tables
- Utility automation → Analyze and vacuum: invokes maintenance
src/RedshiftAutomation/lambda_function.py - Utility automation → System stats snapshots: invokes snapshots
src/RedshiftAutomation/lambda_function.py - Utility automation → WLM scheduler: invokes scheduler
src/RedshiftAutomation/lambda_function.py - Operator → COPY manifests: generates batches
- Operator → Unload and copy: migrates data
- Unload and copy → Transfer task manager: runs tasks
src/UnloadCopyUtility/redshift_unload_copy.py - Unload and copy → Cluster resources: uses resources
src/UnloadCopyUtility/redshift_unload_copy.py - Transfer task manager → Cluster resources: executes resource actions
src/UnloadCopyUtility/util/tasks.py - Operator → Metadata transfer: transfers metadata
- Operator → Multi-table restore: restores tables
- Operator → Lake Formation migration: migrates permissions
- Operator → IDC migration: migrates identities
- Operator → QMR notifications: publishes alerts
- Operator → Utility automation: schedules utilities
- Utility automation → Shared configuration: reads constants
src/RedshiftAutomation/lambda_function.py