CDK Construct Library by Typescript for RDS Dump
Project description
cdk-rds-dump
cdk-rds-dump is a Constructs library for AWS CDK that provides the functionality to dump the contents of Amazon RDS, generate it as an SQL file, and store it in Amazon S3.
Usage
Install from npm:
npm i cdk-rds-dump
Then write CDK code as below:
import { RdsDump, DbEngine } from 'cdk-rds-dump';
declare const rdsCluster: rds.DatabaseCluster;
new RdsDump(this, "RdsDump", {
dbEngine: DbEngine.MYSQL,
rdsCluster: cluster,
databaseName: "testDatabase",
schedule: events.Schedule.cron({ minute: "0", hour: "0" }),
lambdaEnv: {
ENV_VAR: "value",
},
createSecretsManagerVPCEndpoint: true,
createS3GatewayEndpoint: true,
// DB secret is obtained from rdsCluster.secret as default.
// If you want to use a different secret, you can specify it as follows.
// secretId: 'secretsmanager-secret-id',
});
How does it work?
This code creates a new RDS cluster and uses the RdsDump Construct to dump the data from that RDS cluster. The dumped data is generated as an SQL file and stored in Amazon S3.
For detailed usage and details of the parameters, refer to the API documentation.
Why do we need this construct?
AWS RDS is a very useful managed RDB service and includes, by default, the ability to create snapshots. However, in some cases, such as for development reasons, it is easier to handle SQL files dumped from the DB. Therefore, cdk-rds-dump was created as a construct to easily create SQL files on a regular basis.
Contribution
Contributions to the project are welcome. Submit improvement proposals via pull requests or propose new features.
License
This project is licensed under the Apache-2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cdk_rds_dump-2.1.11.tar.gz
.
File metadata
- Download URL: cdk_rds_dump-2.1.11.tar.gz
- Upload date:
- Size: 2.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56e07690151d0dc4f1d51632f9f11825f4f467da67fabd226db89474a7ebd363 |
|
MD5 | 96e5321134e938c2822a40ee515b30d1 |
|
BLAKE2b-256 | 5cdd03246fa1aab9de5aec753474586b2f87c48341103df480d8de64ee34cdc1 |
File details
Details for the file cdk_rds_dump-2.1.11-py3-none-any.whl
.
File metadata
- Download URL: cdk_rds_dump-2.1.11-py3-none-any.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bebe749bcecac9747f25e57b88d0df909119a5514406d1f7cf3ca6d5c34de20e |
|
MD5 | 4c32ebbc3675acbbb7894155b2e5fd05 |
|
BLAKE2b-256 | 5e9a92211f3d26bc81fa58f021ddd4111a9d8c3bb22d3833efb74d03d6d39c10 |