Skip to content
This repository was archived by the owner on Feb 17, 2024. It is now read-only.

Latest commit

 

History

History
56 lines (41 loc) · 1.57 KB

deploy-function.md

File metadata and controls

56 lines (41 loc) · 1.57 KB

Spotinst Functions - Deploy Function

The sls deploy function command deploys an individual function. This command simply compiles a deployment package with a single function handler. This is a much faster way of deploying changes in code.

Note: Please update your Environment ID before deploying a function

  1. Create an Environment
  2. Update your serverless.yml file with the Environment ID
service: myService

provider:
  name: spotinst
  spotinst:
    environment: env-8f451a5f  # NOTE: Remember to add the environment ID

functions:
  hello:
    runtime: nodejs4.8
    handler: handler.main
    memory: 128
    timeout: 30

# extend the framework using plugins listed here:
# https://github.com/serverless/plugins
plugins:
  - serverless-spotinst-functions

Deploy

serverless deploy function -f functionName

Note: Because this command is only deploying the function code, function properties such as environment variables and events will not be deployed.

Options

  • --function or -f The name of the function which should be deployed

more options to come soon