Skip to navigationSkip to main contentSkip to footerScaleway DocsAsk our AI
Ask our AI

How to migrate from JWT to IAM authentication for private functions

Scaleway Serverless Functions used to rely on legacy JWT authentication tokens to access private resources. This feature is now deprecated, you must therefore use Scaleway IAM to access your private functions using an API key.

  1. Set up IAM authentication by creating an IAM application bearing an API key, and grant it the FunctionsPrivateAccess via an IAM policy.

  2. Delete the existing JWT for your Serverless Functions to revoke legacy authentication.

  3. Pass the secret key of your IAM application's API key via the X-Auth-Token header to call your private function:

curl -H "X-Auth-Token: <YOUR_SECRET_KEY>" <YOUR_FUNCTION_ENDPOINT>
Still need help?

Create a support ticket
No Results