Skip to content

Lambda guide should default to V2 API GW protocol #2399

@mikehearn

Description

@mikehearn

Expected Behavior

Following the guide should result in a working Lambda behind AWS API gateway by telling the user to configure the V2 protocol handler by default. If you do accidentally mismatch the protocols, the handlers should detect that and throw a useful error message, not just die with an NPE.

Actual Behaviour

If you use the V1 handler with a V2 API GW then you get a weird NullPointerException. This is the default expected outcome if you don't know much about AWS and just follow the instructions in the Micronaut Guide and AWS tutorials.

Steps To Reproduce

  1. Follow the Micronaut Guide and get it to the point where a test JSON submission works.
  2. Try to invoke it via an API Gateway endpoint so the function can be run from the internet.
  3. It dies with a NullPointerException.

Environment Information

No response

Example Application

No response

Version

4.9.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions