phpbu
phpbu copied to clipboard
Support for S3 Storage Classes
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
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 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();
Awesome thanks ;)