keyv-aurora-data-api
v1.0.0
Published
AWS Aurora Data API adapter for Keyv
Downloads
2
Maintainers
Readme
@keyv/postgres
AWS Aurora Data API storage adapter for Keyv
AWS Aurora Data API storage adapter for Keyv.
Requires Postgres 9.5 or newer for ON CONFLICT
support to allow performant upserts. Why?
Install
npm install --save keyv keyv-aurora-data-api
Usage
const Keyv = require('keyv');
const KeyvDataAPI = require('keyv-aurora-data-api');
const keyv = new Keyv({
store: new KeyvDataAPI({
dialect: 'postgres', // or 'mysql'
secretArn: 'arn:aws:secretsmanager:us-east-1:XXXXXXXXXXXX:secret:mySecret',
resourceArn: 'arn:aws:rds:us-east-1:XXXXXXXXXXXX:cluster:my-cluster-name',
database: 'myDatabase', // default database
}),
});
keyv.on('error', handleConnectionError);
The options for the data API driver is listed here.