Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Latest commit

 

History

History
76 lines (50 loc) · 2.49 KB

README.md

File metadata and controls

76 lines (50 loc) · 2.49 KB

⚡️ Serverless Plugin to set DynamoDB TTL

npm CircleCI license Coveralls

DEPRECATED

AWS CloudFormation supports now TTL, so this plugin for Serverless is useless. More information about how to use it in the AWS documentation.

About the plugin

It's not possible to use DynamoDB's TTL feature with CloudFormation yet. Use this plugin to configure TTL for your DynamoDB with Serverless.

Usage

Add the npm package to your project:

# Via yarn
$ yarn add serverless-dynamodb-ttl

# Via npm
$ npm install serverless-dynamodb-ttl --save

Add the plugin to your serverless.yml:

plugins:
  - serverless-dynamodb-ttl

Configure TTL in serverless.yml:

custom:
  dynamodb:
    ttl:
      - table: your-dynamodb-table-name
        field: your-ttl-property-name

That's it! After the next deployment (sls deploy) serverless will configure your TTL properties in DynamoDB.

License

Feel free to use the code, it's released using the MIT license.

Contributors

Contribution

You are more than welcome to contribute to this project! 😘

To make sure you have a pleasant experience, please read our code of conduct. It outlines our core values and believes and will make working together a happier experience.

Run the tests

# Via yarn
$ yarn test

# Via npm
$ npm test

This will also run standardjs to ensure the changes match the desired code style.