BUG APIGatewayCustomAuthorizerResponse event context cant be interface

Open
#480 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
api

Research direction

Start with APIGatewayCustomAuthorizerResponse and the example in events/README_ApiGatewayCustomAuthorizer.md, then compare both with the linked AWS API Gateway authorizer documentation. Verify the accepted context value types and update the response definition and example so they agree with that behavior.

Written by the indexing model from the issue text.

Description

bug type/events type/ux

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

Dominant language
Go
Stars
3.8k
Forks
578
Avg merge
16h 56m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws/aws-lambda-go

All issues in aws/aws-lambda-go

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.