Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to use server side encryption #154

Closed
cdenneen opened this issue Sep 14, 2022 · 2 comments
Closed

Ability to use server side encryption #154

cdenneen opened this issue Sep 14, 2022 · 2 comments
Labels

Comments

@cdenneen
Copy link

Leverage the S3Client configuration to GetObject/PutObject allowing default AES256 encrytion or KMS.

For AES256 just requires additional parameter to objects for ServerSideEncryption to be passed:

$s3 = new S3Client([
    'version' => 'latest',
    'region'  => 'us-east-1'
]);

// Upload a file with server-side encryption.
$result = $s3->putObject([
    'Bucket'               => $bucket,
    'Key'                  => $keyname,
    'SourceFile'           => $filepath,
    'ServerSideEncryption' => 'AES256',
]);
@timkelty
Copy link
Contributor

timkelty commented Mar 9, 2024

@cdenneen FWIW, as of January 5, 2023, all s3 uploaded objects are encrypted with AES256 by default, even if the ServerSideEncryption param isn't passed.

@timkelty
Copy link
Contributor

timkelty commented Mar 13, 2024

@cdenneen As of 2.2.0, 'ServerSideEncryption' => 'AES256' is now sent by default, as this aligns with S3 defaults.
See: #174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants