- Newest
- Most votes
- Most comments
There may be several reasons why this error occurs. These reasons include, but are not limited to, the following:
-
If you are doing an operation on your S3 bucket and you have set the Region variable to a region other than the one in which the bucket is actually present.
-
The AWS SDK for Java 1.x has entered maintenance mode as of July 31, 2024, and will reach end-of-support on December 31, 2025:
Additionally, you can check below GitHub Pages for further details on such reported issue and possible workarounds:
[+] https://github.com/aws/aws-sdk-java/issues/3069
[+] https://github.com/aws/aws-sdk-java/issues/3017
To resolve this issue, you can check below options/alternatives:
- Kindly verify the AWS region being used in the application and S3 bucket region. You can make use of the setRegion method, which takes precedence over all other options:
s3Client.setRegion(Region.getRegion(Regions.EU_WEST_1));
- If possible, upgrade to a newer version of the AWS SDK for Java. Later versions may have improved handling of VPC endpoints.
Remember to ensure that your IAM policies and VPC endpoint policies are correctly configured to allow access to the S3 bucket through the VPC endpoint.
If these solutions don't resolve the issue, you may want to consider opening a support case with AWS using the following link or reporting the issue to the AWS SDK for Java GitHub repository for further assistance.
Sources
AWS Region Selection
answered a year ago
