Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1 KB

README.md

File metadata and controls

51 lines (33 loc) · 1 KB

aws-parameter-cache

Build Status

Parameter cache for AWS System Manager Parameter Store and AWS Secrets Manager

Installation

npm install --save aws-parameter-cache

How to use

import { ssmParameter } from 'aws-parameter-cache';

const param = ssmParameter({ name: 'foo' });
const value = await param.value;

Secrets Manager Parameter

import { secretsManagerParameter } from 'aws-parameter-cache';

const param = secretsManagerParameter({ name: 'foo' });
const value = await param.value;

Cache invalidation

const param = ssmParameter({ name: 'foo', maxAge: 1000 * 60 * 5 });
const value = await param.value;

Force refresh

const param = ssmParameter({ name: 'foo' });
const value = await param.value;

param.refresh();

const newValue = await param.value;

License

MIT