Awesome
Scaleway Serverless Examples
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:
Examples
🚀 Functions
<!-- markdownlint-disable MD033 -->Example | Runtime | Deployment |
---|---|---|
Badge PHP <br/> A PHP function to generate repository badges. | php82 | Serverless Framework |
CORS Go <br/> A Go function which allows CORS requests. | go122 | Serverless Framework |
CORS Node <br/> A Node function which allows CORS requests. | node18 | Serverless Framework |
CORS Python <br/> A Python function which allows CORS requests. | python310 | Serverless Framework |
CORS Rust <br/> A Rust function which allows CORS requests. | rust179 | Serverless Framework |
Go Hello World <br/> A simple "hello world" example for Go | go121 | Serverless Framework |
Go SQS Publish <br/> A Go function to publish messages to SQS. | go121 | Serverless Framework |
Go MultiPart Upload to S3 <br/> A function to upload file from form-data to S3. | go120 | Serverless Framework |
Image Transform <br/> A function that resizes images from an S3 bucket. | node22 | Serverless Framework |
Image Transform with triggers <br/> A function that resizes images from an S3 bucket and use SQS triggers to smooth traffic. | node20 | Serverless Framework |
Node Terraform <br/> A simple example of deploying a Node Serverless function using Terraform. | node22 | Terraform |
Node MultiPart Upload to S3 <br/> A function to upload file from form-data to S3. | node19 | Serverless Framework |
PHP write to S3 <br/> A PHP function that connects to, and writes to an S3 bucket. | php82 | Terraform |
PostgeSQL Node <br/> A Node function to connect and interact with PostgreSQL database. | node18 | Serverless Framework |
Python ChatBot <br/> A chatbot example with ChatterBot. | python310 | Serverless Framework |
Python Dependencies <br/> Example showing how to use Python requirements with Serverless Framework. | python310 | Serverless Framework |
Python MultiPart Upload to S3 <br/> A function to upload file from form-data to S3. | python311 | Python API Framework |
Python SQS Trigger Hello World <br/> Trigger a function by sending a message to a SQS queue. | python311 | Terraform |
Python SQS Trigger Async Worker <br/> Use SQS queues and function triggers to scheule an async task from another function. | python311 | Terraform |
Python TEM SMTP Server <br/> Send Transactional Emails from a serverless function. | python311 | Terraform |
Redis TLS <br/> How to connect a function to a Scaleway Redis cluster with TLS enabled. | python310 | Terraform |
Rust MNIST <br/> A Rust function to recognize hand-written digits with a simple neural network. | rust179 | Serverless Framework |
PostgreSQL Python <br/> A Python function to perform a query on a PostgreSQL managed database. | python310 | Serverless Framework |
Terraform Python <br/> A Python function deployed with Terraform. | python310 | Terraform |
Triggers Getting Started <br/> Simple SQS trigger example for all runtimes. | all | Terraform |
Triggers NATS <br/> Simple NATS trigger example using Terraform. | all | Terraform |
Typescript with Node runtime <br/> A Typescript function using Node runtime. | node18 | Serverless Framework |
Serverless Gateway Python Example <br/> A Python serverless API using Serverless Gateway. | python310 | Python API Framework |
Go and Transactional Email <br/> A Go function that send emails using Scaleway SDK. | go121 | Serverless Framework |
Rotate RDB Credentials <br/> A Go function that rotates RDB credentials stored in Secret Manager. | go120 | Serverless Framework |
📦 Containers
Example | Language | Deployment |
---|---|---|
Container Bash Script <br/> A Bash script runnning on a schedule using serverless containers. | Bash | Serverless Framework |
Function Handler Java <br/> A Java function handler deployed on CaaS. | Java | Serverless Framework |
NGINX CORS Private <br/> An NGINX proxy to allow CORS requests to a private container. | Python Flask | Terraform |
NGINX hello world <br/> A minimal example running the base NGINX image in a serverless container. | N/A | Serverless Framework |
Python hello world <br/> A minimal example running a Flask HTTP server in a serverless container. | Python | Serverless Framework |
Python S3 upload <br/> A Python + Flask HTTP server that receives file uploads and writes them to S3. | Python | Terraform |
Terraform NGINX hello world <br/> A minimal example running the base NGINX image in a serverless container deployed with Terraform. | N/A | Terraform |
Triggers with Terraform <br/> Configuring two SQS triggers, used to trigger two containers, one public, one private. | N/A | Terraform |
gRPC HTTP2 in Go <br/> A Go gRPC Container using http2 | Go/Protobuf | CLI |
⚙️ Jobs
Example | Language | Deployment |
---|---|---|
Serverless Jobs Hello World <br/> An example of building a container image and running it as a Serverless Job using Terraform. | N/A | Terraform-Console |
Serverless MLOps <br/> An example of running a Serverless Machine Leaning workflow. | Python | Terraform-Console-CLI |
Auto Snapshot Instances <br/> Use Serverless Jobs to create snapshots of your instances | Go | Console |
💬 Messaging and Queueing
Example | Services | Language | Deployment |
---|---|---|---|
Manage large message <br/> An example of infrastructure to manage large messages. | PaaS & S3 | Python | Terraform |
Serverless scraping <br/> An example of infrastructure to scrape the hackernews website. | PaaS & RDB | Python | Terraform |
SNS Instances Notification System <br/> An example of infrastructure to use SNS with Instances. | PaaS & Instances | Golang | Terraform |
💜 Projects
Example | Services | Language | Deployment |
---|---|---|---|
Kong API Gateway <br/> Deploying a Kong Gateway on containers to provide routing to functions. | CaaS & FaaS | Python | Serverless Framework |
Serverless Gateway <br/> Our serverless gateway for functions and containers. | API Gateway | Python | Python API Framework |
Monitoring Glaciers <br/> A project to monitor glaciers and the impact of global warming. | S3 & RDB | Golang | Serverless Framework |
Serverless NextJS app <br/> A serverless Next.js blog with a Serverless Database. | PaaS & SDB | JS | Terraform - CLI |
Contributing
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!