Scaleway logo
Serverless Containers API

Serverless Containers API

Scaleway Serverless Containers is a «Container As A Service» product which gives users the ability to deploy atomic serverless workloads and only pay for resources used while containers are running.

It provides many advantages, such as:

  • Containers are only executed when an event is triggered, which allows users to save money while code is not running
  • Auto-Scalability:
    • Automated Scaling up and down based on user configuration (e.g. min: 0, max: 50 replicas of my container).
    • Automated Scaling to zero when a container is not executed, which is cost-effective for the user and saves computing resources for the cloud provider.
  • Endpoint-only scaling

Serverless Framework

This page explains how to use the Scaleway Containers API, including a quickstart and the full API documentation. However, you may prefer to use the Serverless Framework pluginOpen in new context enabling users to deploy their serverless workloads much more easily with a single serverless deploy command.

If what you are looking for is an easy way to deploy your code, you may prefer Serverless Framework.

Below, you will find a step-by-step guide on how to create a namespace, configure and deploy containers, and trigger your containers via HTTP, CRON triggers, or messaging triggers.

Concepts

Refer to our dedicated concepts pageOpen in new context to find definitions of the different terms referring to Serverless Containers.

Technical information

A Container in Scaleway Containers consists of multiple components:

  • Environment variables: Users may configure specific environment variables (Database host/credentials for example) which are safely encrypted in our Database, and will be mounted inside your containers. Note that environment variables set at namespace level will also be mounted (in every container). Environment variables written at container level override the ones set at namespace level (if two of them bear the same name for example).
  • Docker image: A Docker image contains all the elements required to run your software: code, a runtime environment, tools, scripts, libraries, etc.
  • Resources: Users may decide how much computing resource to allocate to each container -> Memory Limit (in MB). We will then allocate the right amount of CPU based on Memory Limit choice. The right choice for your container's resources is very important, as you will be billed based on compute usage over time and the number of Containers executions.

Product features

  • Fully isolated environments
  • Scaling to zero (saves money and computing resources while the code is not executed)
  • High availability and scalability (automated and configurable, each container may scale automatically according to incoming workloads)
  • Multiple event sources:
  • Integrated to the Scaleway Container Registry product:
    • Deploy any docker image from one of your registry namespace
  • Flexible resources: you can choose values separately for your memory and CPU within a range in respect with maximum and minimum allowed values in Containers Limitation documentationOpen in new context.

Regions

Serverless Containers is available in the Paris, Amsterdam, Warsaw and Milan regions, which are represented by the following path parameters:

  • fr-par
  • nl-ams
  • pl-waw
  • it-mil

Authentication

By default new containers are public meaning that no credentials are required to invoke them.

A container can be private or public. This can be configured through the privacy parameter.

Calling a private container without authentication will return HTTP code 403.

Logs

Containers logs are sent to the project's CockpitOpen in new context.

The Serverless Containers Logs dashboard in Grafana can be used to see containers logs. More complex queries can be done using the "Explore" section of Grafana, and LogQL queries:

Code
{resource_type="serverless_container"}

Additionally, the logs can be retrieved programmatically. For instance, using the logcli utility. For more information, refer to our dedicated documentationOpen in new context.

Going further

For more help using Scaleway Serverless containers, check out the following resources:

Tags