Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
aws-lambda-tensorflow
Advanced tools
A gulp plugin to deploy python tensorflow in aws lambda.
This plugin assumes you have aws-cli installed and configured with proper access rights to use aws lambda.
npm install --save-dev aws-lambda-tensorflow
'use strict';
//npm install --save gulp gulp-zip gulp-awslambda
const gulp = require('gulp');
const zip = require('gulp-zip');
const path = require('path');
const lambda = require('gulp-awslambda');
const aws_lamda_tensorflow = require('aws-lambda-tensorflow');
const lambda_params = {
FunctionName: 'addtensorflow', /* Lambda function name */
Description: 'My tensorflow lambda function that adds two numbers', //Description for your lambda function
Handler: 'simple_add.lambda_handler', //Assuming you will provide main.py file with a function called handler.
MemorySize: 512,
Runtime: 'python2.7',
Role : 'ROLE_STRING',//eg:'arn:aws:iam::[Account]:role/lambda_basic_execution'
Timeout: 50
};
var opts = {
region : 'ap-southeast-2'
}
gulp.task('default', () => {
return gulp.src(['simple_add.py'])
.pipe(aws_lamda_tensorflow({ region : 'ap-southeast-2' })) //Adds all the required files needed to run tensor flow in aws lambda
.pipe(zip('archive.zip'))
.pipe(lambda(lambda_params, opts))
.pipe(gulp.dest('dist'));
});
Six lambda available regions.
Type: string
values: ap-northeast-1, ap-southeast-2, eu-central-1, eu-west-1, us-east-1, us-west-2
Use the specified version of tensorflow.
Check this repository for the available versions
Type: string
Default: LATEST
Just give a pull request.
See Creating-Dependency.md.
FAQs
A gulp plugin to deploy python tensorflow in aws lambda.
We found that aws-lambda-tensorflow demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.