Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
508 views
in Technique[技术] by (71.8m points)

401 Unauthorized with IBM Cloud API Gateway after serverless deploy by sls CLI (have solution, but it's uncomfortable)

I already have a solution for this question, but it's uncomfortable to repeat after each deployment my changes at functions to IBM Cloud. Have anybody some ideas for more comfortable solution?

So, what I've done every deployment.

  1. I do something with invocation function using API Gateway, then got answer with any message from this cloud function - good, it's working. Successful invocation
  2. I want to change some functionality and I changed function's code for it.
  3. I type to the console "serverless deploy" by using serverless CLI with IBM Cloud CLI logged in. Typed commands and changes
  4. After successful deploy, I invoke changed function using same API and got the 401 error. 401 error after deploy
  5. For reduce that error: I open API settings, then remove action of needed function from API (and other actions, if have) (Opened API setting, going to remove action), then save changes, then reload the page (it's necessary), then add these action(s) again (Adding action(s) again), then save changes.
  6. After 5th step, I can get correct answer from cloud function again. Now is correct again with changes

How can I get more comfortable solution?

question from:https://stackoverflow.com/questions/65642115/401-unauthorized-with-ibm-cloud-api-gateway-after-serverless-deploy-by-sls-cli

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...