1. 程式人生 > >Delete Bucket with Amazon S3 Console or AWS CLI

Delete Bucket with Amazon S3 Console or AWS CLI

Warning: The following procedure permanently deletes any data in your S3 bucket. Data deleted and removed from a bucket can't be recovered. Before you proceed, review all of the objects and data in the bucket to be sure that they are no longer needed.

Follow these steps to suspend versioning and then set up lifecycle rules to delete objects in the bucket:

  1. Open the bucket that you want to delete by choosing the bucket's name.
  2. If versioning is enabled, suspend versioning on the bucket.
  3. Choose the Management view, and then choose Lifecycle.
  4. Choose + Add lifecycle rule.
  5. For Enter a rule name
    , type a name for the lifecycle rule.
  6. To run the rule on the entire bucket, leave Add filter to limit scope to prefix/tags blank, and then proceed to step #8. To run the rule on a certain prefix, enter the prefix under Add filter to limit scope to prefix/tags.
  7. Choose Next.
  8. For Configure transitions
    , leave fields blank, and then choose Next.
  9. For Configure expiration, select both Current version and Previous versions.
  10. For Expire current version of the object, type 1 to specify After 1 days from object creation.
  11. For Permanently delete previous versions, type 1 to specify After 1 days from becoming a previous version.
  12. Select Clean up incomplete multipart uploads. Then, type 1 to specify After 1 Days from start of upload.
  13. Choose Next.
  14. Choose Save.
  15. If you had versioning enabled on the bucket, repeat steps #4-9. Then, for Configure expiration, select only Clean up expired object delete markers, and then save the new rule. Note: If you receive the error message "This rule has prefix(es) that are overlapping with (previous_rule_name)," you can still save the rule.

The lifecycle rules run around midnight Universal Coordinated Time (UTC). After the lifecycle rules run, the objects aren't deleted immediately, but they are marked for deletion and you no longer are charged for those objects. For more information, see Configuring Object Expiration.

If there are a large number of objects in the bucket, they might still appear in the Amazon S3 console for a few days, particularly for buckets that had versioning enabled. If the bucket had versioning enabled, delete markers are created after the current versions of objects are deleted. After the delete markers are at least one day old, the lifecycle rules clean up the delete markers as well. It might take a few days for the delete markers to age past one day old, and then for the lifecycle rules to detect their age and remove them.

After the objects are fully deleted (including delete markers), you can delete the bucket.

相關推薦

Delete Bucket with Amazon S3 Console or AWS CLI

Warning: The following procedure permanently deletes any data in your S3 bucket. Data deleted and removed from a bucket can't be recovered. Bef

Tutorial for building a Web Application with Amazon S3, Lambda, DynamoDB and API Gateway

Tutorial for building a Web Application with Amazon S3, Lambda, DynamoDB and API GatewayI recently attended Serverless Day at the AWS Loft in downtown San

Amazon Connect with Amazon Lex Press or Say Input

You’re sitting in a public place and need to contact customer support over the phone. Perhaps you’re traveling and need to confirm or change a res

Restore S3 Object from Amazon Glacier Storage Class with AWS CLI

Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So

Change the VPC or Endpoint ID in an Amazon S3 Bucket Policy

The VPC ID or VPC endpoint ID is not valid If the VPC ID or VPC endpoint ID in the bucket policy is not valid (for example, it's mis

CloudFusion,支持Dropbox, Sugarsync, Amazon S3, Google Storage, Google Drive or WebDAV

in use earth dropbox pytho ase wrapper ora rop nova Linux file system (FUSE) to access Dropbox, Sugarsync, Amazon S3, Google Storage, Goo

Segmenting brain tissue using Apache MXNet with Amazon SageMaker and AWS Greengrass ML Inference

In Part 1 of this blog post, we demonstrated how to train and deploy neural networks to automatically segment brain tissue from an MRI scan in a s

Introducing support for Amazon S3 Select in the AWS SDK for PHP

We’re excited to announce support for the Amazon Simple Storage Service (Amazon S3) SelectObjectContent API with event streams in the AWS SDK for

Authenticate Using AWS Directory Service with Amazon QuickSight

Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So

Predictive Data Science with Amazon SageMaker and a Data Lake on AWS

This Quick Start builds a data lake environment for building, training, and deploying machine learning (ML) models with Amazon SageMaker on the Am

Restore Glacier Objects with Restore Tiers in the S3 Console

Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So

Troubleshoot SMTP Connectivity or Timeout Issues with Amazon SES

2.    Note the output. 3.    If the connection times out, check your local firewall rules, routes, and access control lists (ACLs).

Minute Tutorials with Amazon Web Services (AWS)

Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So

How to Troubleshoot High or Full Disk Usage with Amazon Redshift

SELECT q.query, trim(q.cat_text) FROM ( SELECT query, replace( listagg(text,' ') WITHIN GROUP (ORDER BY sequence), '\\n', ' ') AS cat_text FROM

AWS Marketplace: Attunity CloudBeam for Amazon S3, EMR, Hadoop

Attunity CloudBeam for Amazon S3, EMR, Hadoop - Hourly

How to Build an AWS DeepLens Project with Amazon SageMaker

Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So

Amazon S3(拡張性と耐久性を兼ね揃えたクラウドストレージ)|AWS

Amazon S3 は、最も柔軟なストレージ管理および管理機能を提供します。ストレージ管理者は、データの使用傾向を分類、報告、視覺化して、コストを削減し、サービスレベルを向上させることができます。オブジェクトには獨自のカスタマイズ可能なメタデータを付けることができるため、お客様はワーク

Prepare Environment for Working with AWS CLI and Amazon DynamoDB on Amazon EC2

Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So

Troubleshoot Errors with Creating Amazon Route 53 Resource Record Sets Using the AWS CLI

An error occurred (InvalidChangeBatch) when calling the ChangeResourceRecordSets operation: RRSet of type CNAME with DNS name domain.com. is no

See Amazon S3 Bucket Users

Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So