Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dynamodb-recs

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamodb-recs

### 1. Config Lambda Code

  • 1.0.28
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

AWS Dynamodb/Firehose Based Reccomendation Engine Based on Graphs.

1. Config Lambda Code

const {
    App,
    handlers
} = require('dynamodb-recs');

const app = new App({
    logs: { // optional
        firehose: { // optional
            concurrency: 100,
            stream: 'app-recs-logs'
        },
        process: { // optional
            concurrency: 100,
            offset: 60 * 60 * 1000 // 1 hour
        },
        ttl: 24 * 60 * 60 * 1000 // 1 day optional
    },
    recs: {
        firehose: { // optional
            concurrency: 100,
            stream: 'app-recs'
        },
        jobs: {
            viewView: [{
                entity: 'view'
            }, {
                entity: 'view'
            }]
        },
        ttl: 2 * 365 * 24 * 60 * 60 * 1000, // 2 years optional
        ttr: 30 * 60 * 1000 // 30 minutes optional
    },
    tablePrefix: 'prefix' // optional
});

exports.fetch = handlers.fetch(app);
exports.logsFirehose = handlers.logsFirehose(app);
exports.logsHit = handlers.logsHit(app);
exports.logsProcess = handlers.logsProcess(app);
exports.recsFirehose = handlers.recsFirehose(app);

2. Config Lambda Handlers

Name
app-recs-fetch

Handler
index.fetch

Size
3008 MB

-

Name
app-recs-firehose

Handler
index.recsFirehose

Size
512 MB

-

Name
app-recs-logs-firehose

Handler
index.logsFirehose

Size
512 MB

-

Name
app-recs-logs-hit

Handler
index.logsHit

Size
128 MB

-

Name
app-recs-logs-process

Handler
index.logsProcess

Size
512 MB

3. Config Kinesis Firehose

Name
app-recs

Lambda Transformer
app-recs-firehose

S3 Bucket
app

Prefix
recs/dt=!{timestamp:yyyy}-!{timestamp:MM}-!{timestamp:dd}/

Error prefix
recs-error/err=!{firehose:error-output-type}/dt=!{timestamp:yyyy}-!{timestamp:MM}-!{timestamp:dd}/

-

Name
app-recs-logs

Lambda Transformer
app-recs-logs-firehose

S3 Bucket
app

Prefix
recs-logs/dt=!{timestamp:yyyy}-!{timestamp:MM}-!{timestamp:dd}/

Error prefix
recs-logs-error/err=!{firehose:error-output-type}/dt=!{timestamp:yyyy}-!{timestamp:MM}-!{timestamp:dd}/

5. Config CloudWatch to Process Logs from Time to Time

Period
Each 30 minutes

Lambda
app-recs-logs-process

Body
`{}`

FAQs

Package last updated on 07 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc