Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

245
Views
Disable "delete" option for S3 objects in AWS

I am moving files from EC2 instances to AWS S3. I want to to disable the "delete" option in the AWS S3 (when an object is selected), so that the files which are copied to AWS S3 are safe and are not deleted by mistake. I want to preserve the files for at least 6 months.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

It's not possible to hide that button.

But you have 2 options to block delete of objects at bucket:

  1. Attach policy to your IAM user(s) that Deny s3:DeleteObject action

or (better in my opinion):

  1. Configure bucket policy (Permissions -> Bucket Policy) that will Deny s3:DeleteObject action

For example, bucket policy can look like this:

{
    "Version": "2012-10-17",
    "Id": "<...>",
    "Statement": [
        {
            "Effect": "Deny",
            "Principal": "*",
            "Action": "s3:DeleteObject",
            "Resource": "arn:aws:s3:::<YOUR BUCKET NAME>/*"
        },
        <...>
    ]
}

I checked that, if I selected object and clicked Delete button it look like this:

enter image description here

over 4 years ago · Santiago Trujillo Report

0

This is quite a late entry but it might help someone in future. Another option can be to use S3 object lock but the downside is it only works with versioning enabled and to enable version lock on already created buckets you have to reach out to AWS technical support. This effectively applies WORM policy on every object in the whole bucket and prevent anyone to make modification including the owner. The policy period can be set up later after the creation of the bucket. S3 object lock

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!