AWS AmazonS3: S3 Tables replication KMS policy adds condition keys, scopes access
Summary
Updates the KMS permissions policy used for S3 Tables replication: moves kms:Encrypt into a separate statement and adds kms:ViaService and kms:EncryptionContext:aws:s3:arn condition keys while setting Resource to "*". This tightens the policy so KMS actions are only allowed when requested via the S3 service for the specific table bucket ARNs.
Security assessment
The added kms:ViaService and kms:EncryptionContext:aws:s3:arn conditions implement least-privilege for KMS grants, ensuring the key can only be used via S3 for the specific table bucket ARN rather than broad access. This is permission-boundary hardening guidance, not a fix for a specific disclosed vulnerability.
Evidence
"kms:EncryptionContext:aws:s3:arn": "arn:aws:s3tables:us-east-1:111122223333:bucket/amzn-s3-demo-table-bucket-source/table/*"
Diff
diff --git a/AmazonS3/latest/userguide/s3-tables-replication-setting-up.md b/AmazonS3/latest/userguide/s3-tables-replication-setting-up.md index 5b88e175d..b0f532ea7 100644 --- a//AmazonS3/latest/userguide/s3-tables-replication-setting-up.md +++ b//AmazonS3/latest/userguide/s3-tables-replication-setting-up.md @@ -365,3 +365 @@ The permissions policy uses two resource scopes because the actions operate at d - "kms:GenerateDataKey", - "kms:Encrypt" - + "kms:GenerateDataKey" @@ -369 +367,9 @@ The permissions policy uses two resource scopes because the actions operate at d - "Resource": "arn:aws:kms:us-east-1:111122223333:key/SOURCE-KEY-ID" + "Condition": { + "StringLike": { + "kms:ViaService": [ "s3.us-east-1.amazonaws.com" ] + }, + "ArnLike": { + "kms:EncryptionContext:aws:s3:arn": "arn:aws:s3tables:us-east-1:111122223333:bucket/amzn-s3-demo-table-bucket-source/table/*" + } + }, + "Resource": "*" @@ -373,0 +380 @@ The permissions policy uses two resource scopes because the actions operate at d + "kms:Encrypt", @@ -377,3 +384,9 @@ The permissions policy uses two resource scopes because the actions operate at d - "Resource": [ - "arn:aws:kms:us-west-2:444455556666:key/DESTINATION-KEY-ID-1" - ] + "Condition": { + "StringLike": { + "kms:ViaService": [ "s3.us-west-2.amazonaws.com" ] + }, + "ArnLike": { + "kms:EncryptionContext:aws:s3:arn": [ "arn:aws:s3tables:us-west-2:444455556666:bucket/amzn-s3-demo-table-bucket-destination/table/*" ] + } + }, + "Resource": "*"