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-awslambdaconstgulp=require('gulp');constzip=require('gulp-zip');constpath=require('path');constlambda=require('gulp-awslambda');constaws_lamda_tensorflow=require('aws-lambda-tensorflow');constlambda_params={FunctionName: 'addtensorflow',/* Lambda function name */Description: 'My tensorflow lambda function that adds two numbers',//Description for your lambda functionHandler: '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};varopts={region : 'ap-southeast-2'}gulp.task('default',()=>{returngulp.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.