Replies: 1 comment 3 replies
-
Do you have references to the Redshift encryption requirements?
I'm not sure, but probably |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to use the
AmazonS3EncryptionClientV2
to upload an encrypted file to S3, and then run aCOPY .... ENCRYPTED
command to load that file into Redshift. However, Redshift is not compatible with the encryption format in this SDK. I'm following the instructions here, which simply links to the AWS SDK docs. There are two errors that I'm seeing:The first is that the S3 object created by the SDK does not have the
x-amz-meta-x-amz-key
metadata set. It looks like the encryption library is now settingx-amz-meta-x-amz-key-v2
; is it possible to configure the SDK to set the non-v2 metadata key as well?If I manually set the
x-amz-meta-x-amz-key
metadata entry, Redshift then says it was expecting a 16-byte IV (whereas the S3 object has a 12-byte IV). My understanding is that a 16-byte IV may weaken the AES-GCM cipher but this is mitigated by the envelope encryption generating a unique key per file; is there a way to force this behavior for the sake of interop between AWS services?For reference, these are the metadata values in question (this is all test data; note that I added the
x-amz-meta-x-amz-key
entry manually):I'm pretty sure I've configured the client correctly, as when I
UNLOAD ... ENCRYPTED
from Redshift, I'm able to decrypt the resulting files using the AWS SDK (these files have ax-amz-meta-x-amz-key
metadata entry, and a 16-bytex-amz-meta-x-amz-iv
entry). I can attach a code sample / sample files if that's helpful.Beta Was this translation helpful? Give feedback.
All reactions