这是因为使用的 AWS SDK 版本不兼容或引用了过时的库文件。解决方法是确保使用的 AWS SDK 版本兼容并更新相关库文件。
以下是一些可能有用的代码示例:
AmazonSQS sqs = AmazonSQSClientBuilder.standard() .withCredentials(new AWSStaticCredentialsProvider(credentials)) .withEndpointConfiguration(new EndpointConfiguration("sqs.us-east-1.amazonaws.com", "us-east-1")) .build();