micronautmicronaut-aws

Micronaut AWS lambda Application "Class not found: io.micronaut.function.aws.proxy.MicronautLambdaHandler"


I created an Micronaut AWS lambda application. and uploaded the shadow zip file. And when I test the lambda function I get

Class not found: io.micronaut.function.aws.proxy.MicronautLambdaHandler

I did a ./gradlew assemble and then uploaded the shadow zip file. In lambda runtime settings I add the handler as io.micronaut.function.aws.proxy.MicronautLambdaHandler

Following is my build.gradle

dependencies {
    implementation('io.micronaut:micronaut-runtime:2.5.12')
    implementation('io.micronaut.aws:micronaut-function-aws-api-proxy:2.9.0')
    implementation('io.micronaut.aws:micronaut-aws-sdk-v2:2.9.0')
    implementation('software.amazon.awssdk:s3:2.17.19')
    implementation('javax.annotation:javax.annotation-api:1.3.2')
    runtimeOnly('ch.qos.logback:logback-classic:1.2.5')
    compileOnly('org.graalvm.nativeimage:svm:21.2.0')

    implementation('io.micronaut:micronaut-validation:2.5.12')

    testImplementation('io.micronaut:micronaut-http-client:2.5.12')

}

Am I missing something? Just for sanity I opened the zip file to check if the above class is present and it does. btw: The size of my zip file is 19.2MB. Does size of the zip matters, if so what will be the workaround?


Solution

  • Instead of the zip file I uploaded the shadow jar file and it worked. Now having issued creating native image