Uploading to a EU bucket fails using the new version of S3 plugin (v0.4) with the error:
ERROR: Failed to upload files
java.io.IOException: put Destination [bucketName=xxxxxxxxxxxx, objectName=xxxxxxxxxxxx]: Status Code: 301, AWS Service: Amazon S3, AWS Request ID: B731FD3EB3E36D68, AWS Error Code: PermanentRedirect, AWS Error Message: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint., S3 Extended Request ID: 1ayMHpR5YBq9DtqzPnBq5NdFR0Jn6kRbeaqrUPD4Ur+oUcL2vQlCiGbJSxjr9KXi
at hudson.plugins.s3.S3Profile.upload(S3Profile.java:85)
at hudson.plugins.s3.S3BucketPublisher.perform(S3BucketPublisher.java:143)
at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
at hudson.model.Run.execute(Run.java:1618)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
Build step 'Publish artifacts to S3 Bucket' changed build result to UNSTABLE
It seems that this happen when you access the wrong amazon endpoint.
I've solved it temporarily for our setup by doing a: client.setEndpoint("s3-eu-west-1.amazonaws.com"); both places where AmazonS3Client is initialized in the S3 plugin (we only have EU buckets). There probably exist some easy way of querying for the correct endpoint for a more general solution.