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.
-
Set up IAM authentication by creating an IAM application bearing an API key, and grant it the
FunctionsPrivateAccessvia an IAM policy. -
Delete the existing JWT for your Serverless Functions to revoke legacy authentication.
-
Pass the secret key of your IAM application's API key via the
X-Auth-Tokenheader to call your private function:
curl -H "X-Auth-Token: <YOUR_SECRET_KEY>" <YOUR_FUNCTION_ENDPOINT>See Also
Still need help?Create a support ticket