Skip to content

Instantly share code, notes, and snippets.

@harshq
Last active June 6, 2021 11:06
Show Gist options
  • Save harshq/2ec43934c51484fbb2ee2d6755046966 to your computer and use it in GitHub Desktop.
Save harshq/2ec43934c51484fbb2ee2d6755046966 to your computer and use it in GitHub Desktop.
service: sls-server
frameworkVersion: '2'
plugins:
- serverless-webpack # serverless webpack plugin
package:
individually: true # to package functions individually. You can toggle this and check the difference webpack generates
custom:
webpack: # serverless-webpack plugin options
webpackConfig: webpack.config.js # Name of webpack configuration file
includeModules: true # Node modules configuration for packaging
packager: 'yarn' # Packager that will be used to package your external modules
provider:
name: aws
runtime: nodejs14.x # We use the latest node runtime supported by lambda
region: ap-southeast-1 # Choose your closest region
lambdaHashingVersion: 20201221
functions:
hello:
handler: src/handler.hello
events:
- http:
path: hello
method: get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment