Scaleway Serverless Gateway
The Scaleway Serverless Gateway is a self-hosted API gateway that runs on Scaleway Serverless Containers and Scaleway Managed Database.
It lets you manage routing from a single base URL, as well as handle transversal concerns such as CORS and authentication.
It is built on Kong Gateway, giving you access to the Kong plugin ecosystem to customize your own deployments.
Quickstart
Installation
pip install scw-gateway
This will install scwgw
, and you can see the list of available commands with:
scwgw --help
From here you can set up your gateway with:
scwgw infra deploy
Once the setup process has finished, you can then manage routes as follows:
# Check no routes are configured initially
scwgw route ls
# Check the response directly from a given URL
TARGET_URL=http://worldtimeapi.org/api/timezone/Europe/Paris
curl $TARGET_URL
# Add a route to this URL in your gateway
scwgw route add /time $TARGET_URL
# List routes to see that it's been configured
scwgw route ls
# Curl the URL via the gateway
GATEWAY_ENDPOINT=$(scwgw infra endpoint)
curl https://${GATEWAY_ENDPOINT}/time