-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Cognito authorizer is not found when running sam local api #5131
Comments
Hi @andrybicio, |
I second the Feature request! My only solution for testing locally is with a fallback user ID in my env vars, which is clumsy and has to be different for every developer |
This would be very useful, as it is it's very hard to test anything cognito related locally |
If I could amplify this as a feature request - it's very frustrating having to skip over authorisation when working and testing locally. |
Would it be possible to utilize the |
Any guidance on how to run APIs that use Cognito locally? |
Same here, seems a pretty necessary feature for any cognito + api gateway dev experience. |
Description:
I have an API Gateway whose default authorizer is Cognito, except for an endpoint (in this example /hello [GET]). I want to be able to test the API Gateway using Postman and get the whole AWS Lambda flow, in order to have the best developer experience as if I were in the cloud.
However, endpoints seem to not be protected, even though I have set it properly. It indeed works in the cloud, and the template for this is the one below.
Steps to reproduce:
This is a part of my
template.yml
Observed result:
The output for the command
sam local start-api --env-vars local.json -p 3001 --debug
Expected result:
I would expect that only the
/hello
endpoint could be triggered without any authorizer, whereas the/info
should have in the header some sort of token as I would do if it were deployed.Additional environment details
The text was updated successfully, but these errors were encountered: