serverless-openwhisk
serverless-openwhisk copied to clipboard
Namespace deployment fails
Whenever I try to deploy my functions to a namespace i get an error saying my account is not authorized. However my account is the administrator account. Works fine when using default environment.
serverless.yml
service: asset-registry
provider:
name: openwhisk
namespace: 'environment_dev'
functions:
hello:
handler: handler.hello
events:
- http: GET /hello
plugins:
- serverless-openwhisk
Failed to deploy function (asset-registry-dev-hello) due to error: PUT https://eu-gb.functions.cloud.ibm.com/api/v1/namespaces/environment_dev/actions/asset-registry-dev-hello?ov
erwrite=true Returned HTTP 403 (Forbidden) --> "The supplied authentication is not authorized to access 'environment_dev/asset-registry-dev-hello'."
@benoj 👋 - quick check - is the namespace you are trying to deploy to a (classic) CF-style org and space or a newer-style IAM-enabled namespace?
The IAM namespaces are new and I'm still finalising support for them. You can follow along with progress on this here: https://github.com/serverless/serverless-openwhisk/issues/169
Until then - the temporary work-around is to use an older-style CF based namespace.
Thanks for coming back.
I switched to CF based namespaces and now I'm getting another issue. It seems that when I deploy my functions with serverless I get a 502 error - if I manually create another endpoint in the console pointing to the same action it works however.
I am deploying my functions like so:
OW_AUTH=$CF_AUTH serverless deploy
Where CF_TOKEN is the Namespace Auth creds from https://cloud.ibm.com/openwhisk/namespace-settings
Any idea why this is causing a 502 from the API -> Action? (Invoking the action manually seems to work fine)
Any clues on this? No logs anywhere that I can see? Seems rather confusing...
Can you paste the full error logs?
After creating an IAM API key in IBM Cloud and setting the OW_IAM_NAMESPACE_API_KEY env variable, I still get the same error above. Something else I need to perform?
Bump, I've been having this issue. I've tried just about everything from granting permissions, changing env variables but nothing has worked.
@aaka3207 https://github.com/serverless/serverless-openwhisk/issues/169#issuecomment-647821605 may help
@bn326160 I was on a tight deadline so I ended up using whisk deploy