I created simple spring boot application with a REST end point. I was able to create the native image using mvn spring-boot:build-image. The image is created and I am able to run it locally using docker.
I created the AWS Lambda function using this container image. I am getting an exception as this function is being created and it ends in FAILED state.
Error
Failed to create the function TestAgainAgain: Image runtime config size is larger than 16 KB. ImageConfigSize: 447.53 KB
Any clue on how to avoid/solve the above error will be appreciated
Documented here: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
It seems that the whole Config element is taken from the container. If you inspect your image like so:
At least in my case this is close to the size in the error message from AWS.
It seems due to paketo build packs adding a lot of labels.
I don't have a good solution other than switching to another build tool such as JIB for now.