I am attempting to turn on server side encryption when uploading a file asynchronously to Amazon S3. I have the file upload working but cannot figure out where to specify the encryption option. Any ideas?
using (var s3Client = new AmazonS3Client(awsAccessKeyID, awsSecretAccessKey, regionEndPoint))
{
using (TransferUtility fileTransferUtility = new TransferUtility(s3Client))
{
await fileTransferUtility.UploadAsync(filePath, bucketName, objectkey);
}
}
Edit:
I realize that Amazon has documentation on how to specify encryption using a putObjectRequest but was wondering if it can be done using the FileTransferUtility.
http://docs.aws.amazon.com/AmazonS3/latest/dev/SSEUsingDotNetSDK.html