feat: V1 and V2 of the API Gateway custom authorizer event and the si… by msailes · Pull Request #166 · aws/aws-lambda-java-libs

Conversation

@msailes

…mplified IAM policy.

Issue #, if available:

n/a

Description of changes:

Pojos for the API Gateway custom authorizers

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

msailes

private String requestId;
private String routeKey;
private String stage;
private String time; // "time": "12/Mar/2020:19:03:58 +0000",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be an object?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be better off as a ZonedDateTime object

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, ZonedDateTime (de)serialization is not currently supported in the Java runtimes, either String or org.joda.time.DateTime (currently preferred) should be fine.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is possible to write a custom StdDeserializer to achieve this, but we dont want to do that ? 🤔

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately registering a custom mapper in this library is not currently supported by the Java runtime and this is probably the best solution we can implement at this time IMHO

@msailes

carlzogh

@carlzogh

Thanks a lot for your continued contributions @msailes! 😃

@msailes msailes deleted the api-gw-v2-custom-auth branch

October 8, 2020 11:05