Skip to content

Instantly share code, notes, and snippets.

@gwenf
Last active August 15, 2017 02:48
Show Gist options
  • Save gwenf/fae6649204e850e8aa4645ab36c58caf to your computer and use it in GitHub Desktop.
Save gwenf/fae6649204e850e8aa4645ab36c58caf to your computer and use it in GitHub Desktop.
// basic
aws configure
aws lambda help
zip index.zip handler.js
// serverless
serverless config credentials --provider AWS --key *placeholder* --secret *placeholder* --profile
serverless create --template aws-nodejs --path *folder-name*
sls help
// upload lambda
sls deploy -v
// upload specified function
sls deploy function -f hello
// run locally
sls invoke -f hello -l
(-f denotes the function and -l is for the logs)
// useful for debugging
sls logs -f hello -t
// destroy the function
IAM roles, function, logs, dependencies
sls remove
// production
sls deploy --stage production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment