cloudyr / aws.s3

Amazon Simple Storage Service (S3) API Client
https://cloud.r-project.org/package=aws.s3
381 stars 147 forks source link

How can I pass a kms-key to opts in s3write_using? #344

Open pabuta88 opened 4 years ago

pabuta88 commented 4 years ago

The question says it all. I cannot manage to pass my kms key to the opts list similar than using S3FileSystem in Python. Would it be possible to provide an example? I would highly appreciate that.

matton2 commented 4 years ago

You should be able to pass kms with the opts argument.

s3write_using(df, FUN = readr::write_csv,
                  bucket = bucket,
                  object = object,
                  opts = list(headers = c("x-amz-server-side-encryption" = "aws:kms"))
Nicqu commented 4 years ago

Hi, how can I add a custom kms key for encryption?