2 Answers
- Newest
- Most votes
- Most comments
0
Try changing compiler version to 11 from 1.8.
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<complianceLevel>${maven.compiler.target}</complianceLevel>
Compare your pom with below, which is a working examples. https://github.com/aws-samples/aws-lambda-powertools-examples/blob/main/java/CoreUtilities/Function/pom.xml
answered 2 years ago
0
The Lambda Power Tools Java is an open source project and with this type of use case it would be best to create an issue on the GitHub page so that the owners and contributors of the project would have visibility and also provide guidance or workaround as there may be other persons who have experienced the same.
https://github.com/awslabs/aws-lambda-powertools-java/issues
answered 2 years ago
Relevant content
- Accepted Answerasked 2 years ago
- asked 13 days ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
Hello, Thank you for your indication.
After making the changes, I could not make the deploy using AWS Toolkit, due to the fact that AWS Lambda function is not detected in the upload wizard during the upload into AWS Lambda. This happen because of the AWS Runtime that I have to change to Java 11 while AWS Toolkit detects only Java8.
I made the build using Eclipse Maven plugin and the deploy using web console from Lambda service. This time the weaving worked, but it still does not log the event. Do you have a solution for this, please ? Please see below a stack trace with a good business-error, that shows that the weaving is done:
java.lang.RuntimeException: AmazonDynamoDBv2 requestId: HGUSV59QMGHP9HP5V9VI5CHVH7VV4KQNSO5AEMVJF66Q9ASUAAJG for putItem has ExceptionCode: ConditionalCheckFailedException, with Lambda cause: attribute_not_exists(UserPictureNamePK) at com.amazonaws.lambda.mihai.rekonusers.dao.DynamoDao.putRecord(DynamoDao.java:83) at com.amazonaws.lambda.mihai.rekonusers.LambdaFunctionHandler.handleRequest_aroundBody0(LambdaFunctionHandler.java:37) at com.amazonaws.lambda.mihai.rekonusers.LambdaFunctionHandler$AjcClosure1.run(LambdaFunctionHandler.java:1) at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:257) at software.amazon.lambda.powertools.logging.internal.LambdaLoggingAspect.around(LambdaLoggingAspect.java:109) at com.amazonaws.lambda.mihai.rekonusers.LambdaFunctionHandler.handleRequest(LambdaFunctionHandler.java:27)
Thank you, Mihai