O'Reilly logo

Hands-On Serverless Deep Learning with TensorFlow and AWS Lambda by Rustem Feyzkhanov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Serverless.yml

In the Serverless.yml file, we need to define access to the S3 bucket as that's where we will keep our model. Other than that, it will look exactly as the previously mentioned serverless CML files for other Lambdas:

service: deeplearninglambdaframeworkVersion: ">=1.2.0 <2.0.0"provider:  name: aws  region: us-east-1  runtime: python3.6  memorySize: 1536  timeout: 60iamRoleStatements: - Effect: "Allow" Action: - "s3:ListBucket" Resource: - arn:aws:s3:::serverlessdeeplearning - Effect: "Allow" Action: - "s3:GetObject" Resource: - arn:aws:s3:::serverlessdeeplearning/*functions: main: handler: index.handler

Also, the we need inputimage.jpg image for the inception model.

Let's look at the files that we need to upload to S3 bucket:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required