0.20.25 • Published 5 years ago
resolve-storage-dynamo v0.20.25
resolve-storage-dynamo
This package is a resolve-es
adapter for storing events using DynamoDB.
Available Parameters
...connectionOptions
- a DynamoDB connection options. Refer to Connection Options Format for more information.tableName
- a name of a table storing events.billingMode
- billing mode for dynamodb table.readCapacityUnits
- the maximum number of strongly consistent reads consumed per second.writeCapacityUnits
- the maximum number of writes consumed per second.
Usage
PROVISIONED Billing Mode
import createAdapter from 'resolve-storage-dynamo'
const connectionOptions = {
region: 'localhost',
endpoint: 'http://localhost:8000',
accessKeyId: 'xxx',
secretAccessKey: 'xxx',
}
const adapter = createAdapter({
...connectionOptions,
tableName: 'MY_TABLE_NAME',
billingMode: 'PROVISIONED',
readCapacityUnits: 5,
writeCapacityUnits: 5
})
PAY_PER_REQUEST Billing Mode
import createAdapter from 'resolve-storage-dynamo'
const connectionOptions = {
region: 'localhost',
endpoint: 'http://localhost:8000',
accessKeyId: 'xxx',
secretAccessKey: 'xxx',
}
const adapter = createAdapter({
...connectionOptions,
tableName: 'MY_TABLE_NAME'
})
As Resource
import { create, dispose, destroy, waitForCreate } from 'resolve-storage-dynamo'
const lazyResource = await create({
region,
tableName,
readCapacityUnits,
writeCapacityUnits
})
await waitForCreate(lazyResource)
await dispose({
region,
tableName,
newTableName,
readCapacityUnits,
writeCapacityUnits
})
await destroy({
region,
tableName,
readCapacityUnits,
writeCapacityUnits
})
0.20.25
5 years ago
0.20.24
5 years ago
0.20.23
5 years ago
0.20.22
5 years ago
0.20.21
5 years ago
0.20.20
5 years ago
0.20.19
5 years ago
0.20.18
5 years ago
0.20.17
5 years ago
0.20.16
5 years ago
0.20.15
5 years ago
0.20.14
5 years ago
0.20.13
5 years ago
0.20.12
5 years ago
0.20.11
5 years ago
0.20.10
5 years ago
0.20.9
5 years ago
0.20.8
5 years ago
0.20.7
5 years ago
0.20.6
5 years ago
0.20.5
5 years ago
0.20.4
5 years ago
0.20.3
5 years ago
0.20.2
5 years ago
0.20.1
5 years ago
0.20.0
5 years ago
0.19.8
5 years ago
0.19.7
5 years ago
0.19.6
5 years ago
0.19.5
5 years ago
0.19.4
5 years ago
0.19.3
5 years ago
0.19.2
5 years ago
0.19.1
5 years ago
0.19.0
5 years ago
0.18.17
5 years ago
0.18.16
5 years ago
0.18.15
5 years ago
0.18.14
5 years ago
0.18.13
5 years ago
0.18.12
5 years ago
0.18.11
5 years ago
0.18.10
5 years ago
0.18.9
5 years ago
0.18.8
5 years ago
0.18.7
5 years ago
0.18.6
5 years ago
0.18.5
5 years ago
0.18.4
5 years ago
0.18.3
5 years ago
0.18.2
5 years ago
0.18.1
5 years ago
0.18.0
5 years ago