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.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • GitHub comment 47#277599152
    via GitHub by edwardotis
  • Add compatibility to CEPH
    via GitHub by armin-bauer
  • s3.getObject(bucket,key) fails with 400
    via by Unknown author,
  • Spring Integration DSL ErrorHandling
    via Stack Overflow by James Gilchrist
    • The specified location-constraint is not valid (Service: Amazon S3; Status Code: 400; Error Code: InvalidLocationConstraint; Request ID: 8509B9CACA0AA3D2) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse( at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest( at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper( at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute( at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer( at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute( at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500( at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute( at com.amazonaws.http.AmazonHttpClient.execute( at at at at$createBucket$ Source)

    Users with the same issue

    3 times, last one,
    Unknown User
    48 times, last one,
    1 times, last one,
    Unknown visitor1 times, last one,
    2 times, last one,
    48 more bugmates