AWS

S3

Disable “delete” option for S3 objects in AWS

  1. Attach policy to your IAM user(s) that Deny s3:DeleteObject action
  1. Configure bucket policy (Permissions -> Bucket Policy) that will Deny s3:DeleteObject action
    For example, bucket policy can look like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"Version": "2012-10-17",
"Id": "<...>",
"Statement": [
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:DeleteObject",
"Resource": "arn:aws:s3:::<YOUR BUCKET NAME>/*"
},
<...>
]
}