# cdk-rds-dump

> CDK Construct Library by Typescript for RDS Dump

Latest version **2.1.13** (published 2026-09-05) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install cdk-rds-dump
pnpm add cdk-rds-dump
yarn add cdk-rds-dump
bun add cdk-rds-dump
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support; large bundle.

## Facts

| | |
|---|---|
| Version | 2.1.13 |
| Published | 2026-09-05 |
| First published | 2023-07-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 14 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | Kazuho CryerShinozuka |
| Maintainers | badmintoncryer |
| Keywords | aws, aws-cdk, cdk, lambda, rds |

## Links

- npm: https://www.npmjs.com/package/cdk-rds-dump
- Repository: https://github.com/badmintoncryer/cdk-rds-dump
- Homepage: https://github.com/badmintoncryer/cdk-rds-dump#readme
- Issues: https://github.com/badmintoncryer/cdk-rds-dump/issues
- npm.io page: https://npm.io/package/cdk-rds-dump

## Dependencies (3)

- [mysqldump](https://npm.io/package/mysqldump.md) ^3.2.0
- [@aws-sdk/client-s3](https://npm.io/package/@aws-sdk/client-s3.md) ^3.1072.0
- [@aws-sdk/client-secrets-manager](https://npm.io/package/@aws-sdk/client-secrets-manager.md) ^3.1072.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 2.1.13 (latest) — 2026-09-05
- 2.1.12 — 2026-06-19
- 2.1.11 — 2024-08-22
- 2.1.10 — 2024-08-14
- 2.1.9 — 2024-08-05
- 2.1.8 — 2024-07-20
- 2.1.7 — 2024-07-14
- 2.1.6 — 2024-06-27
- 2.1.5 — 2024-05-30
- 2.1.4 — 2024-05-26
- 2.1.3 — 2024-05-13
- 2.1.2 — 2024-05-06
- 2.1.1 — 2024-04-28
- 2.1.0 — 2024-04-08
- 2.0.5 — 2024-03-26
- … 61 more at https://npm.io/package/cdk-rds-dump/versions

## README

# 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.

![Architecture](./image/architecture.png)

[![View on Construct Hub](https://constructs.dev/badge?package=cdk-rds-dump)](https://constructs.dev/packages/cdk-rds-dump)
[![Open in Visual Studio Code](https://img.shields.io/static/v1?logo=visualstudiocode&label=&message=Open%20in%20Visual%20Studio%20Code&labelColor=2c2c32&color=007acc&logoColor=007acc)](https://open.vscode.dev/badmintoncryer/cdk-rds-dump)
[![npm version](https://badge.fury.io/js/cdk-rds-dump.svg)](https://badge.fury.io/js/cdk-rds-dump)
[![Build Status](https://github.com/badmintoncryer/cdk-rds-dump/actions/workflows/build.yml/badge.svg)](https://github.com/badmintoncryer/cdk-rds-dump/actions/workflows/build.yml)
[![Release Status](https://github.com/badmintoncryer/cdk-rds-dump/actions/workflows/release.yml/badge.svg)](https://github.com/badmintoncryer/cdk-rds-dump/actions/workflows/release.yml)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![npm downloads](https://img.shields.io/npm/dt/cdk-rds-dump.svg?style=flat)](https://www.npmjs.com/package/cdk-rds-dump)


## Usage

Install from npm:

```sh
npm i cdk-rds-dump
```

Then write CDK code as below:

```ts
import * as events from 'aws-cdk-lib/aws-events'
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" }),
  // optional
  lambdaEnv: {
    ENV_VAR: "value",
  },
  // optional
  createSecretsManagerVPCEndpoint: false,
  // 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',
});
```

**Note**: Assuming access to S3 via a Gateway Endpoint from within a VPC, please configure the Gateway Endpoint and update the Route Table based on this.

```ts
// Add gateway endpoints when creating the VPC
  const vpc = new ec2.Vpc(this, 'MyVpc', {
    gatewayEndpoints: {
      S3: {
        service: ec2.GatewayVpcEndpointAwsService.S3,
      },
    },
  });
```

## 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](./API.md).

## 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.

---
_Source: https://npm.io/package/cdk-rds-dump · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
