NavigationContentFooter
Jump toSuggest an edit

Methods to deploy Serverless Functions

Reviewed on 03 April 2024Published on 10 March 2023

Serverless Functions can be deployed and managed using several tools. This page aims to help you find the right tool for your use case.

Tip

You can find examples using all the deployment methods shown here in our Serverless Examples repository.

Scaleway console

The Scaleway console is the easiest way to get started deploying functions.

The console lets you deploy functions written in a single source file in your browser.

Refer to the dedicated documentation for more information.

Deploying larger projects with dependencies and many files requires zipping your code before uploading it. Refer to the documentation on packaging functions in a zip file for more information.

Serverless framework

Serverless Framework is a tool dedicated to making the deployment of serverless applications easier, including Scaleway Serverless Functions and Containers.

With Serverless Framework, you can deploy your Serverless Functions via a single command: serverless deploy function.

Your function configuration is done via a single YAML file, which can be checked into your version control system.

Installation, examples, usage, and advanced documentation are available in the Serverless Scaleway Plugin repository.

Serverless Framework can be used in many use cases such as CI/CD, production deployments, and multi-project deployments with serverless-compose.

Many of the examples found in our Serverless Examples repository make use of Serverless Framework, and can help you get started.

Terraform

Serverless Functions integrate easily with your infrastructure as code, via our Terraform provider and resources.

Examples using Terraform can be found in our Serverless Examples repository, such as our example using Terraform with Python.

API

The Scaleway HTTP API lets you manage your Serverless Functions via HTTP calls.

The HTTP API can be useful when integrating Function management into your automated tasks, continuous integration, and more custom use cases.

Refer to the API procedure for more information.

Note

Deploying a function requires multiple API calls (namespace creation, function creation, generating URL to push code, function deployment), hence will require more boilerplate code than some of the other methods listed here.

API-Framework (Python)

Writing parts of your API fully in Python is possible with the serverless-api-project.

It integrates perfectly with Python code bases where you just need to import the package to expose your handlers directly in the cloud.

CLI

The Scaleway CLI is a simple command line interface that allows you to create, update, delete and list your Serverless Functions.

Installation instructions and documentation are available in the Scaleway CLI repository.

Below is an example of using the CLI to deploy a function:

scw function namespace create name=hello
# saving my namespace ID for later use
scw function function create name=myfunc runtime=go120 namespace-id=<MY-NAMESPACE-ID>

Locally

To develop and test your functions locally before deploying them, we provide frameworks to test your code:

  • Go framework
  • Python framework
  • Node framework

Scaleway SDKs

The Scaleway SDKs allow you to manage your resources directly from your favorite languages.

The available SDKs are:

  • Go SDK
  • JS SDK
  • Python SDK

The documentation for each SDK is held in its respective repository.

Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway