AWS Lambda is a compute service that runs your code in response to events and automatically manages the compute resources for you, making it easy to build applications that respond quickly to new information.
Algorithmia + Lambda
Algorithmia provides a built-in AWS Lambda Node.js blueprint, making it easy to call the Algorithmia API in response to events from Amazon Kinesis, Amazon DynamoDB, Amazon S3, and other Amazon web services.
For example, you could combine several algorithms from Algorithmia to:
- Automatically generate smart thumbnails (using face detection to ensure every thumbnail is perfectly cropped)
- Take advantage of Algorithmia’s speech-to-text algorithm to transcribe videos uploaded to S3 on the fly
- You could even leverage a predictive model every time DynamoDB updates.
Algorithmia and Lambda make it easy to rapidly build and deploy serverless solutions in minutes.
Setup your Lambda function
- Navigate to the AWS Lambda console
Create a Lambda function
Algorithmiainto the filter
- Select the Algorithmia blueprint
- Setup Auth in your Lambda function using the below guide
- Specify your algorithm and input data
apiKey to your Algorithmia API key.
Advanced authentication (more secure)
Follow these steps to encrypt your Algorithmia API Key for use in your function.
1. Create a KMS key
Follow this AWS guide to create your KMS key.
2. Give your lAWS Lambda function execution role permission for the
3. Encrypt the event collector token using the AWS CLI
4. Copy the base-64 encoded, encrypted key (CiphertextBlob) to the
See the NodeJS guide for an introduction to using the Algorithmia NodeJS client to call algorithms and manage data.
See also the AWS Lambda walk through on our blog.