com.amazonaws.services.s3.model.AmazonS3Exception: The bucket is in this region: null.Please use this region to retry the request (Service: Amazon S3; Status Code: 301; Error Code: PermanentRedirect; Request ID: EA0959BA1B1D56A7)
Searched on Google with the first line of a JAVA stack trace?
We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.
Recommended solutions based on your search
Samebug tips
- Expert tip
Set the S3 bucket to the same region as AmazonS3Client, otherwise it just throws this exception. Check if your bucket name is correct as well.
Solutions on the web
via Stack Overflow by jcalloway
, 1 year agovia GitHub by akiradeveloper
, 2 years agovia GitHub by landonreed
, 1 year agovia GitHub by yuriti89
, 1 year agovia GitHub by sebastiankirsch
, 1 year agovia Stack Overflow by Samuel Alexander
, 1 year agocom.amazonaws.services.s3.model.AmazonS3Exception: The bucket is in this region: null.Please use this region to retry the request (Service: Amazon S3; Status Code: 301; Error Code: PermanentRedirect; Request ID: EA0959BA1B1D56A7)
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1372)
at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:919)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:697)
at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:449)
at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:411)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:360)
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3962)
at com.amazonaws.services.s3.AmazonS3Client.getBucketPolicy(AmazonS3Client.java:2544)
at com.amazonaws.services.s3.AmazonS3Client.getBucketPolicy(AmazonS3Client.java:2504)