How to add a custom domain to a function
Published on 21 February 2022
Each function comes with an automatically generated domain on which it is available. However it is possible to assign your own domain name to make it easier to use your functions.
Identity and Access Management (IAM):
If you have activated IAM, you may need certain IAM permissions to carry out some actions described on this page. This means:
- you are the Owner of the Scaleway Organization in which the actions will be carried out, or
- you are an IAM user of the Organization, with a policy granting you the necessary permission sets
Requirements:
- You have an account and are logged into the Scaleway console
- You have a running Serverless Function
- You have a domain name
- Add a CNAME record pointing to your function’s default URL from the domains dashboard.
- Click the Endpoints tab on your Function’s Overview page.
- Click + Add a New Endpoint.
- Enter your custom domain URL and validate the form.
- Connect to your function using your custom domain once you have checked the CNAME and TLS fields.
Note:
Be careful, for now Custom Domains does not support websockets. If you need to use websockets you have to configure them with the original URL.
See Also