Skip to content
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

BUG APIGatewayCustomAuthorizerResponse event context cant be interface #480

Open
tharun-d opened this issue Jan 31, 2023 · 3 comments
Open
Labels
bug type/events issue or feature request related to the events package type/ux

Comments

@tharun-d
Copy link

tharun-d commented Jan 31, 2023

Hi Team,

APIGatewayCustomAuthorizerResponse has some thing called
Context map[string]interface{} json:"context,omitempty"

but atually it should be map[string]string only strings are accepted,
More documentation: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html

so it will not create any confusion if we change this to string,
If not I tried to send some json model which throws errors

Even the example is wrong:
https://github.com/aws/aws-lambda-go/blob/main/events/README_ApiGatewayCustomAuthorizer.md,
we cant send boolean or numbers also

@bmoffatt bmoffatt added bug type/ux type/events issue or feature request related to the events package labels Apr 23, 2023
@weaverjess
Copy link

@tharun-d
Does this actually prevent the context from being propagated and used in template mapping on the API Gateway side?
My team and I have hit a snag where we cannot seem to be able to get the context values on the authorizer response to propagate and wonder if this is wahy.

@tharun-d
Copy link
Author

tharun-d commented Jul 3, 2023

Hi @weaverjess it's been more than 5 months, I totally forget about this,
yeah might be you cant the response values if you send other than string try only string and check whether you receive the response in string

@weaverjess
Copy link

@tharun-d Thanks!

Our error turned out to be unrelated/something else that had to do with it not being clear that context simply cannot be used when raising an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug type/events issue or feature request related to the events package type/ux
Projects
None yet
Development

No branches or pull requests

3 participants