dynamodb-analytics
v1.0.59
Published
### 1. Config Lambda Code
Downloads
62
Readme
How to
1. Config Lambda Code
const {
App,
handlers
} = require('dynamodb-analytics');
const app = new App({
analytics: { // optional
ttl: 2 * 365 * 24 * 60 * 60 * 1000, // 2 years
ttr: 30 * 60 * 1000 // 30 minutes
},
logs: {
firehose: {
concurrency: 100, // optional
stream: 'app-analytics-logs'
}
},
tablePrefix: 'prefix' // optional
});
exports.fetch = handlers.fetch(app);
exports.logsFirehose = handlers.logsFirehose(app);
exports.logsHit = handlers.logsHit(app);
2. Config Lambda Handlers
Name
app-analytics-fetch
Handler
index.fetch
Size
3008 MB
-
Name
app-analytics-logs-firehose
Handler
index.logsFirehose
Size
512 MB
-
Name
app-analytics-logs-hit
Handler
index.logsHit
Size
128 MB
3. Config Kinesis Firehose
Name
app-analytics-logs
Lambda Transformer
app-analytics-logs-firehose
S3 Bucket
app
Prefix
analytics-logs/dt=!{timestamp:yyyy}-!{timestamp:MM}-!{timestamp:dd}/
Error prefix
analytics-logs-error/err=!{firehose:error-output-type}/dt=!{timestamp:yyyy}-!{timestamp:MM}-!{timestamp:dd}/