phpbu icon indicating copy to clipboard operation
phpbu copied to clipboard

Support for S3 Storage Classes

Open csaggo opened this issue 5 years ago • 3 comments

This is a feature suggestion. As far as i can tell from documentation S3 Storage Classes are not supported currently.

I think it would be a nice addition as Backups usually don't need standard-Storage class in S3 and could be stored in a class for infrequent access.

See: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html

csaggo avatar Feb 03 '20 20:02 csaggo

Good idea

Maybe you have an idea how to do this via the SDK on a quick look I did not find an example on how to do it :/

sebastianfeldmann avatar Feb 04 '20 23:02 sebastianfeldmann

@sebastianfeldmann I can't find any reference of those storage classes either in the PHP SDK doc. The only thing that looks close to setting a request header is the setOption in the example code below. But i have no idea if this also works with the x-amz-storage-class header that we would have to use. I'll try to do a little test with the sdk, when i have time and get back to you.

$uploader = UploadBuilder::newInstance() ->setClient($client) ->setSource('/path/to/large/file.mov') ->setBucket('mybucket') ->setKey('my-object-key') ->setOption('Metadata', array('Foo' => 'Bar')) ->setOption('CacheControl', 'max-age=3600') ->build();

csaggo avatar Feb 05 '20 12:02 csaggo

Awesome thanks ;)

sebastianfeldmann avatar Feb 05 '20 14:02 sebastianfeldmann