Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aws java sdk for ssm gives java.lang.NoSuchFieldError: SIGNING_REGION

Following code gives NoSuchFieldError when used in Lambda. The same works in a simple java program. Appreciate any help..

        AWSSimpleSystemsManagementAsync client = AWSSimpleSystemsManagementAsyncClientBuilder.defaultClient();

        PutParameterRequest putRequest = new PutParameterRequest();
        putRequest.setName("testKey");
        putRequest.setValue("testValue");
        client.putParameter(putRequest);

Digging into the source code shows error at AWSSimpleSystemsManagementClient.java -> request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());

Also tried with AWSSimpleSystemsManagementClientBuilder.standard(); AWSSimpleSystemsManagementClientBuilder.defaultClient();
WSSimpleSystemsManagementClientBuilder.standard().withRegion("us-east-1").build(); returning the same error

like image 436
Joe Manavalan Avatar asked Oct 24 '25 05:10

Joe Manavalan


1 Answers

Check that you have don't have a mistmach of aws versions. you might be having the same issue I had, upgrading ssm aws version to 1.11.301 while other components had the 1.11.271 aws core version, causing the same exception. You should make sure versions are aligned

like image 80
Amichai Ungar Avatar answered Oct 26 '25 19:10

Amichai Ungar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!