# serverless-aurora-plugin

> A simple serverless framework plugin to create an aurora serverless database

Latest version **1.2.1** (published 2018-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install serverless-aurora-plugin
pnpm add serverless-aurora-plugin
yarn add serverless-aurora-plugin
bun add serverless-aurora-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2018-12-08 |
| First published | 2018-12-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Derek Honerlaw |
| Maintainers | honerlawd |

## Links

- npm: https://www.npmjs.com/package/serverless-aurora-plugin
- npm.io page: https://npm.io/package/serverless-aurora-plugin

## Recent versions

- 1.2.1 (latest) — 2018-12-08
- 1.2.0 — 2018-12-08
- 1.1.1 — 2018-12-08
- 1.1.0 — 2018-12-08
- 1.0.0 — 2018-12-01

## README

# serverless-aurora-plugin

Generates a serverless aurora db instance either with a new vpc + subnets or an existing vpc + subnets.

#### Notes
- It is assumed the existing subnet + vpc are generated in the same serverless.yml file, it doesn't attempt to reference outputs from another CF template.
- This plugin only supports AWS

#### TODO
- Test / Write Tests
- Better TS Definitions
- Support referencing Outputs from another CF template

#### Options
```javascript
{
    username: string; // must be alphanumeric
    password: string; // must be at least 8 characters in length
    identifier?: string; // defaults to AuroraClusterID{stage}
    backupRetentionPeriod?: number; // defaults to 7
    backupWindow?: string; // defaults to 1am - 2am utc
    maintenanceWindow?: string; // defaults to monday 3am - 4am utc
    minCapacity?: number; // default 0
    maxCapacity?: number; // default 2
    autoPause?: boolean; // default true
    autoPauseSeconds?: number; // default 5 min
    vpc: {
        // both of these are required if create a new vpc
        cidr: string;
        subnetCidrs: string[];

        // both of these are required if using an existing vpc
        name: string;
        subnetNames: string[];
    };
}

```

#### Examples
```yaml
service: example-service

provider:
  name: aws
  region: us-east-1
  stage: example

plugins:
- serverless-fargate-plugin

custom:
  aurora:
    username: myawesomeusername
    password: myawesomepassword
    identifier: MyAwesomeIdentifier
    backupRetentionPeriod: 10 # keep backups for 10 days
    backupWindow: 03:00-04:00 # utc
    maintenanceWindow: mon:05:00-mon:06:00 # utc
    minCapacity: 4
    maxCapacity: 16
    autoPause: true
    autoPauseSeconds: 60 # 1 minute
    vpc
      cidr: 10.0.0.0/16
      subnetCidrs:
      - 10.0.1.0/24
      - 10.0.2.0/24
      name: MyExistingVPC
      subnetName:
      - MyExistingSubnetOneInVPC
      - MyExistingSubnetTwoInVPC
```

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