Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save 100daysofdevops/53effd1b3e2322e6d23cc4729b5233aa to your computer and use it in GitHub Desktop.

Select an option

Save 100daysofdevops/53effd1b3e2322e6d23cc4729b5233aa to your computer and use it in GitHub Desktop.
{
"Version": "2012-10-17",
"Id": "PutObjPolicy",
"Statement": [
{
"Sid": "DenyIncorrectEncryptionHeader",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::<bucket_name>/*",
"Condition": {
"StringNotEquals": {
"s3:x-amz-server-side-encryption": "AES256"
}
}
},
{
"Sid": "DenyUnEncryptedObjectUploads",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::<bucket_name>/*",
"Condition": {
"Null": {
"s3:x-amz-server-side-encryption": true
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment