AWS SCP for mandating S3 bucket encryption

62 views Asked by At

I am trying to get a scp policy which would mandate s3 bucket encryption. Below given is the policy but this is providing me access denied error while trying to create bucket.

{
"Sid": "DenyNoEncryption",
"Effect": "Deny",
"Principal": {
"Action": "s3:CreateBucket",
"Resource": "*",
"Condition": {
"StringNotEquals": {
"s3:x-amz-server-side-encryption-kms-id": "kms-id"
}
}
}
0

There are 0 answers