micronaut-aws
micronaut-aws copied to clipboard
Support custom runtimes not only when using API Gateway Proxy
Our current support for AWS Lambda for Custom runtimes depends on using the API Gateway proxy integration.
We should support using custom runtimes and GraalVM native image generation for every raw lambda functions.
We have made progress to support any RequestHandler, see https://micronaut-projects.github.io/micronaut-aws/snapshot/guide/index.html#customRuntimeGraal
But we have to support Handlers implementing RequestStreamHandler. See:
https://github.com/micronaut-projects/micronaut-aws/blob/master/function-aws-custom-runtime/src/main/java/io/micronaut/function/aws/runtime/AbstractMicronautLambdaRuntime.java#L346-L349
@sdelamo are you going to be able to complete this issue before AWS 2.0 release?
@sdelamo @alvarosanchez too late already, the feature missed the boat
@sdelamo Just to verify, this makes it impossible to port a RequestStreamHandler based lambda to graalvm using micronaut right? I suspect your link has changed over time. Regardless of the link, I simply get:
"{\"message\":\"Not Found\",\"_links\":{\"self\":{\"href\":\"https://nullnull\",\"templated\":false}},\"_embedded\":{\"errors\":[{\"message\":\"Page Not Found\"}]}}
....as reply for the invocations.
Ever get anywhere with this? I am trying to read an SQSEvent and it works great on the JVM but the message always comes up null when I use a native-image.
Thanks.
Adding this to my repo made it work with SQSEvent.
import com.amazonaws.services.lambda.runtime.events.SQSEvent
import io.micronaut.core.annotation.Introspected
@Introspected(classes = [SQSEvent.SQSMessage::class, SQSEvent.MessageAttribute::class])
class SQSEventConfiguration {
}
Add this to your ObjectMapper
MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES