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

No way to set a requestContext.authorizer when running locally #685

Open
psxpaul opened this Issue Sep 29, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@psxpaul

psxpaul commented Sep 29, 2018

Description:
I am developing a lambda function behind an ApiGateway that is authenticated with Cognito. I need to read the event.requestContext.authorizer property to get the cognito user's unique id. As far as I can tell, there is no way to set this property when running sam local start-api.

Steps to reproduce the issue:

  1. sam local start-api

Observed result:
event.requestContext.authorizer is undefined

Expected result:
There should be a way of passing a value to event.requestContext.authorizer when running locally. Maybe requests with a x-apigateway-event header could be passed through?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment