-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the user to specify a KMS key in the event of bucket encryption #73
Comments
Hi @jdeprin , currently you can refer to this guide: |
The instructions in the guide doesn't work if you try to add it to the source S3 bucket policy. The principal is missing and you really can't add the KMS resource in the bucket policy. Can you elaborate how to properly implement it? |
Hi @openspace-henryngo , sorry this is a documentation mistake, we will update this soon. This policy is not the S3 bucket policy, it is the policy for the IAM user which Credential stored in the Secrets Manager. For example, if you deployed the Data Transfer Hub in AWS Account A China Region, and want to pull S3 data from AWS Account B US-west-2 Region, and the source bucket in us-west-2 is encrypted this KMS.
|
Hi @YikaiHu. I deployed the DTH in the US region (Account A), the origin bucket is in the same region and the destination bucket in China (Account B). I ended up creating 2 credentials in Account A Secrets Manager. The 1st one will access the Account A S3 bucket and has KMS decrypt permissions and the other is the IAM user in Account B which has the write access to the Account B/destination S3 bucket. |
Hi @openspace-henryngo ,This scenario will required some additional steps.
|
I think creating an IAM user in the source account with KMS decrypt permission to the source bucket is a faster option at this time. |
But the EC2 launched by Data Transfer Hub will not automatically use the IAM user you created. |
It's not clear to me what you mean by this but it's been working for me so far. For clarification, in the Source settings, I have to select 'No' for 'Is bucket in this account section then I select the appropriate Secrets under Credentials Store. There are no errors from the EC2s launch and the transfer completes. The task status remains 'In Progress' indefinitely but after I confirm both buckets have the same size I just go ahead and stop the task. |
The solution with creating credentials for the KMS encrypted source bucket only works if the Source setting for "Is Bucket in this account" is set to "No". This, however, removes the option to "Enable S3 Event" which is very relevant for Fixed Rate Transfer Tasks on Changes within the S3 Bucket. I think that this is a very common use case across all customers, which should be enabled, even if the source bucket is "not in the current account" |
Currently, there is no way to transfer out of a bucket encrypted with KMS. If you try the transfer job fails. Ideally, the DTH task would allow a user to enter the KMS key ARN or ID and include appropriate IAM permissions in the auto-generated policies.
The text was updated successfully, but these errors were encountered: