mercredi 26 août 2015

Uploading file to Amazon S3 with KMS key in xcode

I am trying to upload an xml file to Amazon S3 with Server side encrytion using KMS key using SSEKMSKeyId, but i am getting the below Error

"Server Side Encryption with AWS KMS managed key requires HTTP header x-amz-server-side-encryption : aws:kms"

I am not able to find a way to pass http header with uploadrequest.

Below is the code i am using

AWSS3TransferManagerUploadRequest *uploadRequest = [AWSS3TransferManagerUploadRequest new];

uploadRequest.SSEKMSKeyId=KMSKey;

uploadRequest.body = body;

uploadRequest.key = key;

uploadRequest.bucket = S3BucketName;

[self upload:uploadRequest];

Can someone please help me in resolving this issue.

Thanks Varun




Aucun commentaire:

Enregistrer un commentaire