-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Micronaut function support for AWS API Gateway #540
Comments
I've added a section (API AWS Gateway) to the Functions AWS Lambda Guide http://guides.micronaut.io/micronaut-function-aws-lambda/guide/index.html#awsApiGateway |
thanks @sdelamo, but usually AWS API Gateway in combination with AWS Lambda is used with Proxy Integration AFAIK (mentioned in the AWS docs), in which it transforms the input and output. Reference:
This is why Spring for example has a specific ApiGatewayRequestHandler which does the necessary mapping (and perhaps more). Something like this would most likely be preferable out of the box for Micronaut as well? |
@drissamri you may find this library useful https://github.com/agorapulse/micronaut-libraries we faced the same issues |
+1 for this. Easy integration with API Gateway would be great, similar to https://github.com/awslabs/aws-serverless-java-container/tree/master/aws-serverless-java-container-spark for Spark. |
+1. This should be treated as a first-class citizen with Micronaut. We've been struggling with a complete POC of Micronaut on AWS Lambda. |
Probably should be built on https://github.com/awslabs/aws-serverless-java-container/tree/master/aws-serverless-java-container-core |
API Gateway support added and documented here https://micronaut-projects.github.io/micronaut-aws/snapshot/guide/#apiProxy Example app can be found at https://github.com/micronaut-projects/micronaut-aws/tree/master/examples/api-proxy-example |
@graemerocher this seems to work with the generated API Gateway URL (e.g: https://fiyxdrgglb.execute-api.eu-west-1.amazonaws.com/dev/label) but doesn't seem to work with a custom domain. The lambda is invoked but gives back a HTTP 404, should this be logged as a bug or is there something else that needs to be configured? It seems like there was a related bug in the past: aws/serverless-java-container#112
|
@graemerocher I dealt with a similar issue. with a custom name, you get everything into the path including stage context. feel free to use my solution |
support of custom domain is a requirement for us. This item should be re-opened to address. |
I have created a new issue since this does seem to be a bug. If I can help out in any way with testing this since I have a domain setup in AWS, feel free to ping me. |
PRs are welcome. Otherwise will look into it next week. Thanks |
Expected Behaviour
Out of the box support for AWS Lambda that are used with an AWS API Gateway in front of it.
This seems like a common use case, which would be nice if this could be supported without having to provide custom code for it.
Maybe several handlers could be provided, like this is done in Spring?
https://github.com/spring-cloud/spring-cloud-function/blob/master/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/src/main/java/org/springframework/cloud/function/adapter/aws/SpringBootApiGatewayRequestHandler.java
Actual Behaviour
No out of the box support
The text was updated successfully, but these errors were encountered: