Accelerate Your Serverless Development with AWS SAM & Scotty
Scotty is a simple tool that uploads your Lambda code without redeployment of the whole stack. Scotty parses your
template.yaml file, gets all the serverless functions, zips the folders of these functions, uploads them to s3 and calls AWS API
lambda.updateFunctionCode. Scotty helps you to accelerate your development! Instant development and deployment of your functions. No more waiting for the redeployment of the whole stack.
npm i serverless-scotty inside the folder where your
template.yaml is located.
Add a command (see below) to your package.json file. Don't forget to update
Important: Make sure your
template.yaml doesn't contain short form cloudformation functions such as
!GetAttinstead use full function names such as
Important: Each function needs to have an explicit
Here is an example that you can use
AWSTemplateFormatVersion: '2010-09-09'Transform: AWS::Serverless-2016-10-31Description: An example for a template that works with scotty!Globals:Function:Timeout: 3Resources:HelloWorldFunction:Type: AWS::Serverless::FunctionProperties:FunctionName: HelloWorldFunction # FunctionName needs to be explicitly passed here!!!CodeUri: hello_world/Handler: app.lambdaHandlerRuntime: nodejs8.10Environment:Variables:PARAM1: VALUEEvents:HelloWorld:Type: ApiProperties:Path: /helloMethod: get