Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
sam local start-api Missing Authentication Token #437
When I run
My API is exposed without auth.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Starting from scratch for debug:
Now when I access http://127.0.0.1:3000/anythinghere it continues to work as expected.. so I don't think that is my issue.
Edit: Digging a little deeper.. it looks like even if I explicitly set the path to
Edit2: Additional context, using https://github.com/gorilla/mux + https://github.com/awslabs/aws-lambda-go-api-proxy internally. When I set the path to
I'm getting the same error with SAM CLI, version 0.4.0. It doesn't look like it's routing to the static files in my case.
So this is an issue with Flask and how the endpoints are modeled. By default Flask does not resolve the
Maybe? But SAM CLI can't since we support API to Lambda on the same root path, so there can be path conflicts. Instead, you should just add the
Marking this as a bug
I'm experiencing the same. Using SAM local
Both configurations appear to work normally once deployed to the cloud.
I think this is going to become more prevalent as an issue now the runtime API has opened new languages and frameworks up to Lambda, and more people are going to get on-board with developing serverless functions locally, expecting their chosen language / framework to handle routing for them.
MacOS, SAM CLI version 0.8.1
@jfuss Ok, shall do :) Although I'm not sure that it is different? Looking at the original bug report by @0xdevalias it looks like the config is almost exactly the same as the config I have, and their experience is the same... (the only difference I can see is that I also have
Ah, sorry, I didn't think it was relevant - I was adding context to the fact I'm seeing the same as the OP, and I didn't want to simply add an unhelpful '+1' or 'me too' comment. The root path works OK, as implied by 'GET returns the "missing authentication token" on all catch-all routes'.