Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It looks like creating a bucket policy might do the trick, but I am having trouble creating the policy.

share|improve this question

The AWS Policy Generator is a very helpful tool for the exploration and creation of such policies, its usage is explained in the respective introductory blog post (a direct link to it it is meanwhile available alongside most policy entry forms within the AWS Management Console as well).

I've created an example according to your specification (make sure to generate a new one for your own resources of course):

{
  "Id": "ExamplePolicyId12345678",
  "Statement": [
    {
      "Sid": "ExampleStmtSid12345678",
      "Action": [
        "s3:DeleteBucket"
      ],
      "Effect": "Deny",
      "Resource": "arn:aws:s3:::test-example-com",
      "Principal": {
        "AWS": [
          "*"
        ]
      }
    }
  ]
}

Please note that the AWS Management Console currently neither hides the delete command nor reports on its execution being unsuccessful for buckets with such policies, however, the bucket remains in place ;)

share|improve this answer
    
Can you still delete the bucket through logging into the AWS Control Panel? – Henley Chiu Jan 7 at 20:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.