Search code examples
ibm-cloud-infrastructureobject-storage

Does softlayer cloud object storage support Bucket Lifecycle configuration


We are using a object storage account on softlayer and looking to create a lifecycle configuration on the buckets inorder to implement time to live. I am using the aws-sdk-java library as the amazon client.

however any requests such as s3client.setBucketLifecycleConfiguration(bucketName, configuration); returns a bucket already exists exception, per amazon docs is it mandatory for the bucket to exist before making the above api call. It appears to me that the object storage does not support this api call and returns an incorrect error message at that.

Any help is greatly appreciated.


Solution

  • You are correct, the COS implementation of the S3 API doesn't support lifecycle policies (although object expiry is definitely on the roadmap). Any TTL logic for buckets or objects needs to be done application side for now. Nelson's answer has the link to the docs listing the current subset of supported operations.

    As far as the error message is concerned, I can see how that would be confusing. What's happening is the system is ignoring the unsupported query parameter in the HTTP call, and the only thing the system sees is a PUT request to a bucket endpoint, and the bucket already exists. I'll add a note to the documentation about this behavior, thanks for pointing it out.