sst / guide

Repo for guide.sst.dev
https://guide.sst.dev
MIT License
3.68k stars 446 forks source link

Comments: Call the Create API #48

Closed jayair closed 6 years ago

jayair commented 7 years ago

Link to chapter - http://serverless-stack.com/chapters/call-the-create-api.html

walshe commented 6 years ago

followed this to resolve my issue - https://serverless-stack.com/chapters/debugging-serverless-api-issues.html turns out of course that the original api prefix that I had specified in the role policy was now wrong because a new 'serverless deploy' had deployed apis to new url prefix

zipper1972 commented 6 years ago

Upon attempting to log in, I was getting the following error:

TypeError: __WEBPACK_IMPORTED_MODULE_0_aws_sdk_global__["util"].crypto.lib.randomBytes is not a function. (In '__WEBPACK_IMPORTED_MODULE_0_aws_sdk_global__["util"].crypto.lib.randomBytes(128)', '__WEBPACK_IMPORTED_MODULE_0_aws_sdk_global__["util"].crypto.lib.randomBytes' is undefined)

I'm running AWS SDK version 2.188 Downgrading to version 2.177 fixes the problem.

jayair commented 6 years ago

@zipper1972 Thanks for reporting. Some other folks had run into this issue as well. Something was off on the AWS SDK end.

mochfauz commented 6 years ago

image I got this issues man

jayair commented 6 years ago

@mbahfauz Have you solved this already? I see some of your other comments about other issues.

ringoyip0901 commented 6 years ago

Whenever I call this API or try to create a note, I get the following error. Any advice or pointers? Thank you! I'm pretty sure I set all the cors to be true on my serverless.yml file. I also read through all the comments above but none of the solutions seemed to work for me. The status code is 401.

screen shot 2018-05-04 at 4 00 01 pm
jayair commented 6 years ago

@ringoyip0901 Did this chapter work for you - https://serverless-stack.com/chapters/test-the-apis.html?

If it did then we might have to look at the logs to see what is going on.

jayair commented 6 years ago

This issue was moved to https://discourse.serverless-stack.com/t/comments-call-the-create-api/124