https://github.com/blairnangle/redshift-restore
Restoring a production Redshift cluster in another environment from snapshot
https://github.com/blairnangle/redshift-restore
boto3 redshift terraform
Last synced: 2 months ago
JSON representation
Restoring a production Redshift cluster in another environment from snapshot
- Host: GitHub
- URL: https://github.com/blairnangle/redshift-restore
- Owner: blairnangle
- License: mit
- Created: 2023-01-13T08:33:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-18T20:36:39.000Z (about 1 year ago)
- Last Synced: 2025-01-25T11:41:52.886Z (4 months ago)
- Topics: boto3, redshift, terraform
- Language: HCL
- Homepage: https://blairnangle.com/blog/restoring-a-production-redshift-cluster-in-another-environment-from-snapshot
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# redshift-restore
Accompanies the blog post
at [blairnangle.com/blog/restoring-a-production-redshift-cluster-in-another-environment-from-snapshot](https://blairnangle.com/blog/restoring-a-production-redshift-cluster-in-another-environment-from-snapshot).## Usage (creating and sharing snapshot)
### Install requirements
```shell
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```### Standard auth
`snapshot.py` uses a regular AWS Access Key ID and Secret Access Key:
```shell
export SOURCE_ACCOUNT_AWS_ACCESS_KEY_ID=…
export SOURCE_ACCOUNT_AWS_SECRET_ACCESS_KEY=…export TARGET_ACCOUNT_AWS_ACCOUNT_NUMBER=…
``````shell
./snapshot.py
```### Session-based auth
`snapshot-with-sesson.py` uses the credentials above plus an accompanying Session Token.
As above, _plus_:
```shell
export SOURCE_ACCOUNT_AWS_SESSION_TOKEN=…
``````shell
./snapshot-with-session.py
```## Costs
The usual disclaimer about AWS resources costing actual money applies.
## License
Distributed under an [MIT License](./LICENSE).