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

algo-lambda

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

algo-lambda

AWS Lambda Wrapper for Algorithmia functions

  • 0.0.7
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Serverless Component - Algorithmia Function Lambda Wrapper

 

This is a simple Serverless Framework Component that creates a Lambda wrapper to an Algorithmia function. With a Lambda wrapper, an Algorithmia function can be triggered by AWS Events - such as SNS, SQS, etc.

 

  1. Install
  2. Usage
  3. Deploy

 

1. Install

Install the Serverless Framework:

$ npm i -g serverless

Add the access keys of an AWS IAM Role with AdministratorAccess in a .env file, using this format:

AWS_ACCESS_KEY_ID=1234
AWS_SECRET_ACCESS_KEY=1234

Or, you can set these as environment variables manually before deploying.

2. Usage

Create a serverless.yml in an empty directory and add the following:

name: demo

summarizer:
  component: 'algo-lambda'
  inputs:
    env:
      apiKey: 'YOUR_ALGORITHMIA_API_KEY'
      algorithm: 'nlp/Summarizer/0.1.8' # See Algorithmia marketplace

In the same directory, create a package.json file with the following contents:

{
  "dependencies": {
    "algo-lambda": "latest"
  }
}

Run npm install

See example here.

3. Deploy

Deploy via the serverless command:

$ serverless

Use the --debug flag if you'd like to learn what's happening behind the scenes:

$ serverless --debug

New to Components?

Checkout the Serverless Components repo for more information.

Keywords

FAQs

Package last updated on 07 Oct 2019

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