I have a Micronaut
microservice which had to be upgraded with the following version changes:
Micronaut bom
version:1.3.1
to1.3.4
Gradle
:5.1.1
to5.3
Graal VM
:19.2.1
I am building the native-image using the buildspec.yml
as given below:
phases:
build:
commands:
- 'mkdir -p build'
- 'pwd'
- 'ls'
- 'chmod +x build-native-image.sh'
- './build-native-image.sh'
- 'cp /usr/lib/graalvm/jre/lib/amd64/libsunec.so libsunec.so'
- 'chmod 755 bootstrap'
- 'chmod 755 server'
- 'chmod 755 cacerts'
- 'chmod 755 libsunec.so'
- 'BUILD_ID=$(cat build_id.txt)'
- 'zip -j example-function-$BUILD_ID.zip bootstrap server cacerts libsunec.so build_id.txt'
artifacts:
files:
- './example-function-*.zip'
The example-function.zip
got deployed to AWS Lambda
and while testing it through APIGateway
, I am able to get the response but unable to view the loggers that I used in my service in the CloudWatch Logs
.
I have followed this article https://docs.aws.amazon.com/kinesisanalytics/latest/java/cloudwatch-logs-writing.html#cloudwatch-logs-writing-slf4j for adding the Logger dependency to my build.gradle
file but the logs are still not showing up on AWS.
Also, I am unable to run the application locally using the command: gradlew run -t classes
. The build is successful but the run command does not work as the endpoint in postman
says Could not get any response
.
I am unsure what the issue is. Any help is greatly appreciated.