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 downbased on user configuration (e.g. min: 0, max: 50 replicas of my container). - Automated
Scaling to zerowhen a container is not executed, which is cost-effective for the user and saves computing resources for the cloud provider.
- Automated
- 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
namespacelevel will also be mounted (in every container). Environment variables written atcontainerlevel override the ones set atnamespacelevel (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 ofCPUbased 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:
- HTTP (request on our gateway will execute the container)
- CRON (time-based job, runs according to configurable cron schedule)
- SQS messaging, compatible with Scaleway QueuesOpen in new context
- NATS messaging, compatible with Scaleway NATSOpen in new context
- 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 and Warsaw regions, which are represented by the following path parameters:
fr-parnl-amspl-waw
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
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:
- Our main documentationOpen in new context
- The #serverless-containers channel on our Slack CommunityOpen in new context
- Our support ticketing systemOpen in new context.