0.20.25 • Published 6 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
6 years ago
0.20.24
6 years ago
0.20.23
6 years ago
0.20.22
6 years ago
0.20.21
6 years ago
0.20.20
6 years ago
0.20.19
6 years ago
0.20.18
6 years ago
0.20.17
6 years ago
0.20.16
6 years ago
0.20.15
6 years ago
0.20.14
6 years ago
0.20.13
6 years ago
0.20.12
6 years ago
0.20.11
6 years ago
0.20.10
6 years ago
0.20.9
6 years ago
0.20.8
6 years ago
0.20.7
6 years ago
0.20.6
6 years ago
0.20.5
6 years ago
0.20.4
6 years ago
0.20.3
6 years ago
0.20.2
6 years ago
0.20.1
6 years ago
0.20.0
6 years ago
0.19.8
6 years ago
0.19.7
6 years ago
0.19.6
6 years ago
0.19.5
6 years ago
0.19.4
6 years ago
0.19.3
6 years ago
0.19.2
6 years ago
0.19.1
6 years ago
0.19.0
6 years ago
0.18.17
6 years ago
0.18.16
7 years ago
0.18.15
7 years ago
0.18.14
7 years ago
0.18.13
7 years ago
0.18.12
7 years ago
0.18.11
7 years ago
0.18.10
7 years ago
0.18.9
7 years ago
0.18.8
7 years ago
0.18.7
7 years ago
0.18.6
7 years ago
0.18.5
7 years ago
0.18.4
7 years ago
0.18.3
7 years ago
0.18.2
7 years ago
0.18.1
7 years ago
0.18.0
7 years ago