1 Answer
- Newest
- Most votes
- Most comments
0
If you are adding encryption to the files, ensure that the IAM role has the necessary permissions to use the encryption key. If you are using a Customer Managed Key (CMK) in KMS, you need to grant the role permissions to use the key:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::YOUR_ACCOUNT_ID:role/YOUR_IAM_ROLE"
},
"Action": [
"kms:Encrypt",
"kms:Decrypt",
"kms:ReEncrypt*",
"kms:GenerateDataKey*",
"kms:DescribeKey"
],
"Resource": "arn:aws:kms:REGION:YOUR_ACCOUNT_ID:key/YOUR_KMS_KEY_ID"
}
]
}
I am only adding AES-256 encryption, therefore I believe there is no need to add any extra permissions, since it did work for some buckets but not for others.
Access to some buckets can be limited somewhere higher for example Service Control Policy on the Organizational level
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated 5 months ago

please accept the answer if it was helpful