Hello guys, I have an error 403 does someone know ...
# help
t
Hello guys, I have an error 403 does someone know how I can fix it? And my new note component wont show up?
r
Where are you getting a 403? What is going on at the time?
t
Once I log in and go to the main page that should preview all the tasks
I'm not sure if It's something that has to do with CORS or with S3 or It's combined. I'm stuck on this issue for some time and really have no clue
r
How does auth work in your app for accessing the api? (I'm assuming you have api gateway in front of a lambda)
t
https://serverless-stack.com/chapters/deploy-the-apis.html I use these api endpoints but I don't think I made an API gateway
I'm really new to all of the backend stuff so sorry if I type something that doesn't make sense
r
Yes, that'll give you an API Gateway with routes matching the configured endpoints
First thing to make sure is that frontend api call is to the correct URL
t
I'll check that out right away, I used it in the config.js file I think only ?
r
Front end config?
t
Yes
r
Sorry, I haven't followed that guide so I don't know what it creates
Easiest to call via postman or similar first to check things
t
Oh okay, I shall put the api link into postman>
? *
r
Call the deployed endpoints from something like Postman
Sometimes easier to see what's going on rather than doing it via the frontend app
t
Oh yeah, I checked and it says no auth token but I forgot to update the api gateway here https://serverless-stack.com/chapters/create-a-cognito-identity-pool.html
I'll give that a try right away
r
The reason I mentioned checking the route is because the 'missing authentication token' shows when the route is incorrect
t
Is there a way I can edit my identity pool policy after I had made it already?
Ohhh
Shall I recreate my identity pool then? I have to update the policy because I input the wrong api gateway id before
r
I suspect it depends on the changes you want to make. The cloudwatch docs will tell you what can be updated without replacing it
If you're just playing about you could delete the stack and redeploy
t
what do you mean by the stack ?
r
All your resources de plop together are called a stack. In aws you can see the stack in the cloudwatch section of the console
De plop! Deployed!
t
Okay, thanks 😄 , Btw which of the apis I got should I use
Copy code
POST - <https://0f7jby961h.execute-api.us-east-1.amazonaws.com/prod/notes>
  GET - <https://0f7jby961h.execute-api.us-east-1.amazonaws.com/prod/notes/{id}>
  GET - <https://0f7jby961h.execute-api.us-east-1.amazonaws.com/prod/notes>
  PUT - <https://0f7jby961h.execute-api.us-east-1.amazonaws.com/prod/notes/{id}>
  DELETE - <https://0f7jby961h.execute-api.us-east-1.amazonaws.com/prod/notes/{id}>
these are the tutorial ones not mine
Now I'm getting a 502 error lol
r
It depends on what you want to prove
Maybe POST notes so you can create some data to use with the others
I personally wouldn't enable auth for the endpoints until you have proven they work
I'd also recommend going back and reading the detail of the tutorial so you really understand what is getting deployed
t
Oh okay, thank you so much for your time and help. I will do that 😄
r
No worries