Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Add template for Serverless Application Model (SAM) deployment #1

Description

@yoavz

Add support for deploying with https://aws.amazon.com/serverless/sam/. I believe all that is required is a template.yaml file that should look something like:

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: ...
Resources:
  ScikitLearnFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: scikit_learn_lambda.handler
      Runtime: python3.7
      MemorySize: 1024
      Environment:
        Variables:
          SKLEARN_MODEL_PATH: "model.joblib"
      Layers:
        - ...
      Events:
        HttpPost:
          Type: Api
          Properties:
            Path: '/predict'
            Method: post

Similar to the serverless.yaml template, this should have documentation on how to deploy a model that is packaged with the code and a how to deploy a model from S3, including the required IAM permissions for S3 reads.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions