AWS clean-rooms: Add S3 ListBucket and KMS permissions guidance for Clean Rooms roles
Summary
Adds guidance to retain s3:GetBucketLocation and s3:ListBucket alongside s3:PutObject, and adds a JSON statement granting kms:GenerateDataKey and kms:Decrypt for SSE-KMS buckets, plus clarifies account/membership ID placeholders in the trust policy.
Security assessment
The change documents least-privilege IAM/KMS permissions (kms:GenerateDataKey, kms:Decrypt) and S3 bucket permissions needed for a service role, and clarifies trust policy placeholders. It is security best-practice documentation rather than a fix for a specific vulnerability.
Evidence
+If your Amazon S3 bucket uses server-side encryption with a customer managed AWS KMS key (SSE-KMS), add a statement that grants AWS KMS permissions to the previous policy. If the KMS key is in a different AWS account than this role, the key policy must also allow this role to use the key. If the role or the key policy doesn't grant these permissions, the job can fail with an access denied error from AWS KMS when it writes results.
Diff
diff --git a/clean-rooms/latest/userguide/setting-up-roles.md b/clean-rooms/latest/userguide/setting-up-roles.md index 46e7700..edf5330 100644 --- a//clean-rooms/latest/userguide/setting-up-roles.md +++ b//clean-rooms/latest/userguide/setting-up-roles.md @@ -733,0 +734,2 @@ Your Amazon S3 resources must be in the same AWS Region as the AWS Clean Rooms c +Keep the `s3:GetBucketLocation` and `s3:ListBucket` permissions on the bucket in addition to `s3:PutObject`. If the role doesn't have `s3:ListBucket`, the job can fail with an Amazon S3 access denied error when it writes results. + @@ -775,0 +778,21 @@ JSON +If your Amazon S3 bucket uses server-side encryption with a customer managed AWS KMS key (SSE-KMS), add a statement that grants AWS KMS permissions to the previous policy. If the KMS key is in a different AWS account than this role, the key policy must also allow this role to use the key. If the role or the key policy doesn't grant these permissions, the job can fail with an access denied error from AWS KMS when it writes results. + +The following JSON statement shows the AWS KMS permissions to add: + + { + "Effect": "Allow", + "Action": [ + "kms:GenerateDataKey", + "kms:Decrypt" + ], + "Resource": "arn:aws:kms:region:keyOwnerAccountId:key/keyId" + } + +In the AWS KMS statement, replace the following values: + + * `region` – The AWS Region of the KMS key. + + * `keyOwnerAccountId` – The AWS account ID that owns the KMS key. + + * `keyId` – The ID of the KMS key. + @@ -780 +803 @@ JSON - * `jobRunnerAccountId` – The AWS account ID in which the S3 bucket is located. + * `jobRunnerAccountId` – The AWS account ID of the member who can run jobs. In the example trust policy, this is 111122223333. @@ -784 +807 @@ JSON - * `rrAccountId` – The AWS account ID in which the S3 bucket is located. + * `rrAccountId` – The AWS account ID of the member who can receive results. In the example trust policy, this is 444455556666. @@ -786 +809 @@ JSON - * `rrMembershipId` – The **Membership ID** of the member who can receive results. The **Membership ID** can be found on the **Details** tab of the collaboration. This ensures that AWS Clean Rooms is assuming the role only when this member runs the analysis in this collaboration. + * `rrMembershipId` – The **Membership ID** of the member who can receive results. The **Membership ID** can be found on the **Details** tab of the collaboration. This ensures that AWS Clean Rooms is assuming the role only to write results for this member in this collaboration.