SSEUsingDotNetSDK
Specifying Server-Side Encryption Using the AWS SDK for .NET
When you upload an object, you can direct Amazon S3 to encrypt it. To change the encryption state of an existing object, you make a copy of the object and delete the source object. By default, the copy operation encrypts the target only if you explicitly request server-side encryption of the target object. To specify server-side encryption in the CopyObjectRequest
, add the following:
For a working sample of how to copy an object, see Copy an Amazon S3 Object in a Single Operation Using the AWS SDK for .NET.
The following example uploads an object. In the request, the example directs Amazon S3 to encrypt the object. The example then retrieves object metadata and verifies the encryption method that was used. For information about creating and testing a working sample, see Running the Amazon S3 .NET Code Examples.