This is a collection of example projects and patterns for use with Scaleway's serverless products.
Useful Links:
- Function Documentation
- Containers Documentation
- Slack Community #serverless-functions #serverless-containers
Table of Contents:
Example | Runtime | Deployment |
---|---|---|
Badge PHP A PHP function to generate repository badges. |
php82 | Serverless Framework |
CORS Go A Go function which allows CORS requests. |
go119 | Serverless Framework |
CORS Node A Node function which allows CORS requests. |
node18 | Serverless Framework |
CORS Python A Python function which allows CORS requests. |
python310 | Serverless Framework |
CORS Rust A Rust function which allows CORS requests. |
rust165 | Serverless Framework |
Go SQS Publish A Go function to publish messages to SQS. |
go118 | Serverless Framework |
Go MultiPart Upload to S3 A function to upload file from form-data to S3. |
go120 | Serverless Framework |
Image Transform A function that resizes images from an S3 bucket. |
node16 | Serverless Framework |
Image Transform with triggers A function that resizes images from an S3 bucket and use SQS triggers to smooth traffic. |
node20 | Serverless Framework |
Node MultiPart Upload to S3 A function to upload file from form-data to S3. |
node19 | Serverless Framework |
PHP write to S3 A PHP function that connects to, and writes to an S3 bucket. |
php82 | Terraform |
PostgeSQL Node A Node function to connect and interact with PostgreSQL database. |
node18 | Serverless Framework |
Python ChatBot A chatbot example with ChatterBot. |
python310 | Serverless Framework |
Python Dependencies Example showing how to use Python requirements with Serverless Framework. |
python310 | Serverless Framework |
Python MultiPart Upload to S3 A function to upload file from form-data to S3. |
python311 | Python API Framework |
Python SQS Trigger Hello World Trigger a function by sending a message to a SQS queue. |
python311 | Terraform |
Python SQS Trigger Async Worker Use SQS queues and function triggers to scheule an async task from another function. |
python311 | Terraform |
Redis TLS How to connect a function to a Scaleway Redis cluster with TLS enabled. |
python310 | Terraform |
Rust MNIST A Rust function to recognize hand-written digits with a simple neural network. |
rust165 | Serverless Framework |
PostgreSQL Python A Python function to perform a query on a PostgreSQL managed database. |
python310 | Serverless Framework |
Terraform Python A Python function deployed with Terraform. |
python310 | Terraform |
Triggers Getting Started Simple SQS trigger example for all runtimes. |
all | Terraform |
Triggers NATS Simple NATS trigger example using Terraform. |
all | Terraform |
Typescript with Node runtime A Typescript function using Node runtime. |
node18 | Serverless Framework |
Serverless Gateway Python Example A Python serverless API using Serverless Gateway. |
python310 | Python API Framework |
Example | Language | Deployment |
---|---|---|
Container Bash Script A Bash script runnning on a schedule using serverless containers. |
Bash | Serverless Framework |
Function Handler Java A Java function handler deployed on CaaS. |
Java | Serverless Framework |
NGINX CORS Private An NGINX proxy to allow CORS requests to a private container. |
Python Flask | Terraform |
NGINX hello world A minimal example running the base NGINX image in a serverless container. |
N/A | Serverless Framework |
Terraform NGINX hello world A minimal example running the base NGINX image in a serverless container deployed with Terraform. |
N/A | Terraform |
Triggers with Terraform Configuring two SQS triggers, used to trigger two containers, one public, one private. |
N/A | Terraform |
Example | Services | Language | Deployment |
---|---|---|---|
Kong API Gateway Deploying a Kong Gateway on containers to provide routing to functions. |
CaaS & FaaS | Python | Serverless Framework |
Serverless Gateway Our serverless gateway for functions and containers. |
API Gateway | Python | Python API Framework |
Monitoring Glaciers A project to monitor glaciers and the impact of global warming. |
S3 & RDB | Golang | Serverless Framework |
Want to share an example with the community? 🚀
We'd love to accept your contributions. Here are the steps to provide an example:
- Fork the repository
- Write your example.
- Add a README.md. Please use the provided template.
- Open a new Pull Request.
You can also open an issue to suggest new examples or improvements to existing ones!