aurora-snapshot-copier-cdk
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

aurora-snapshot-copier-cdk

For copying Aurora snapshots between regions on a schedule

docs npm NPM

Getting started

import { AuroraSnapshotCopier } from 'aurora-snapshot-copier-cdk';

// ...

new AuroraSnapshotCopier(this, 'AuroraSnapshotCopier', {
    // Specify a list of source filters.
    // To be considered for copying, a snapshot must match
    // all filters for at least one source
    sources: [{
        // Filter by cluster identifier
        dbClusterIdentifier: 'mysourceclusteridenifier',
        // By tags
        tags: {
            // The tag on the snapshot must match one of the values in the list
            myTag: ['tagValue', 'otherTagValue'],
            // Or if `true`, then the tag just must exist on the snapshot at all
            myOtherTag: true,
        },
        // By create time
        snapshotCreateTimeNotBefore: new Date('2021-01-01'),
    }],
    aggregation: {
        // Copy at most this many snapshots per run
        latestCountPerCluster: 2,
    },
    target: {
        // The regions to copy into
        regions: ['eu-west-2'],
        deletionPolicy: {
            // The number of copied snapshots to retain in each target region
            keepLatestCountPerDbClusterIdentifier: 1,
            // By default, just marks snapshots that it would have liked to delete.
            // Set this to actually do the deleting
            // apply: true,
        },
    },
});

TODO:

  • More docs

Readme

Keywords

Package Sidebar

Install

npm i aurora-snapshot-copier-cdk

Weekly Downloads

13

Version

2.1.0

License

MIT

Unpacked Size

118 kB

Total Files

12

Last publish

Collaborators

  • winjer
  • plumdog
  • isotoma-ci