Unsolved
This post is more than 5 years old
1 Rookie
•
11 Posts
0
1572
June 28th, 2018 00:00
Bucket LifeCycle : The request is not valid with the current state of the bucket.
We are getting com.amazonaws.services.s3.model.AmazonS3Exception: The request is not valid with the current state of the bucket.
when trying to save BucketLifecycleConfiguration with AbortIncompleteMultipartUpload Rule.
Even without .withAbortIncompleteMultipartUpload(abortIncompleteMultipartUpload); save configuration is failing.
As per the document https://www.emc.com/collateral/TechnicalDocument/docu86295.pdf , ecs supports "PUT Bucket lifecycle"
I am not sure whether we are missing something here.
We have used Amazon s3 sdk to connect to dell emc ecs. The code Snippet is:
AbortIncompleteMultipartUpload abortIncompleteMultipartUpload = new AbortIncompleteMultipartUpload();
abortIncompleteMultipartUpload.setDaysAfterInitiation(1);
BucketLifecycleConfiguration.Rule rule1 = new BucketLifecycleConfiguration.Rule()
.withAbortIncompleteMultipartUpload(abortIncompleteMultipartUpload);
// Add the rules to a new BucketLifecycleConfiguration.
BucketLifecycleConfiguration configuration = new BucketLifecycleConfiguration()
.withRules(Arrays.asList(rule1));
// Save the configuration.
s3Client.setBucketLifecycleConfiguration(bucketName, configuration);
//code is failing at this line
benschumacher
1 Rookie
•
75 Posts
0
June 28th, 2018 12:00
What version of ECS are you running? We didn't add support to cleanup incomplete MPU with lifecycle policy until ECS 3.2.
Ben
naveen_bijalwan
1 Rookie
•
11 Posts
0
June 29th, 2018 01:00
Thanks for the quick response. We are using currently using v3.0.0.0 . I think we would upgrade to ECS 3.2 and test.