This is not currently implemented in s3fs, the backend used by dask to write to S3. It would not be hard to add, by including (some of) the following parameters in the constructor for S3FileSystem, and including them in the small number of calls on the boto3 s3client; then the parameters would be included in storage_options=
when calling to_parquet()
.
ServerSideEncryption='AES256'|'aws:kms',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
SSEKMSKeyId='string',
There should also be an option to set these per-file as well as by default on the file-system instance. Feel free to attempt a PR! Note that SSE is probably not implemented in moto
, so testing usage may be difficult.
Note that in your case, some of these values are probably being read by the aws command from a standard location such as ~/.aws/
.