Skip to content

Instantly share code, notes, and snippets.

@ystoneman
Created May 27, 2021 12:53
Show Gist options
  • Save ystoneman/f096906e3ce838bfc4867d9cacd52c59 to your computer and use it in GitHub Desktop.
Save ystoneman/f096906e3ce838bfc4867d9cacd52c59 to your computer and use it in GitHub Desktop.
The minimum permissions to give the DataSync IAM role on your KMS key policy if your S3 bucket is encrypted with that KMS key.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Allow use of the key to the DataSync role",
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::012345678910:role/service-role/AWSDataSyncS3BucketAccess-yann-stoneman-dev-storage-us-east-1-012345678910"
]
},
"Action": [
"kms:Encrypt",
"kms:Decrypt",
"kms:ReEncrypt*",
"kms:GenerateDataKey*",
"kms:DescribeKey"
],
"Resource": "*"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment