AWS S3 什么时候删除过期的对象?
When will AWS S3 delete the expired objects?
我有一个带有 1 天到期生命周期规则的 AWS S3 存储桶。但是 AWS 并没有自动删除过期的对象。如何让 AWS 自动删除过期的对象?这些已过期但未移除的对象是否仍然需要支付额外费用?
没有 AWS 会每天评估一次过期规则,并且不会像下面的文档中所说的那样收取费用。
We evaluate the expiration rules once each day. During this time,
based on their expiration dates, any object found to be expired will
be queued for removal. You will not be billed for any associated
storage for those objects on or after their expiration date. If server
access logging has been enabled for that S3 bucket, an
S3.EXPIRE.OBJECT record will be generated when an object is removed.
https://aws.amazon.com/blogs/aws/amazon-s3-object-expiration/
请注意,AWS 只保证运行您不会为过期对象付费。 AWS 不提供任何保证运行过期对象实际被清理的时间。根据我的经验,这通常是 到期的一天,但是这周我 运行 遇到了生产问题,因为我的一个 Lambda 因 S3 中的对象数量而窒息由于我在存储桶上设置的生命周期策略,存储桶通常是有限的。 Amazon AWS Support 的查询证实了这一点:
Thank you for the provided information, I have checked the LifeCycle Management for the eu-west-1 region and have noted that there has been a recent increase in the number of objects to be expired.
As the LifeCycle Manager is asynchronous for all S3 Buckets the region, increases in the number of objects to be expired can introduce longer delays [1].
因此,当您制定 AWSome 解决方案时,请注意这一点!
[1] https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-expire-general-considerations.html
我有一个带有 1 天到期生命周期规则的 AWS S3 存储桶。但是 AWS 并没有自动删除过期的对象。如何让 AWS 自动删除过期的对象?这些已过期但未移除的对象是否仍然需要支付额外费用?
没有 AWS 会每天评估一次过期规则,并且不会像下面的文档中所说的那样收取费用。
We evaluate the expiration rules once each day. During this time, based on their expiration dates, any object found to be expired will be queued for removal. You will not be billed for any associated storage for those objects on or after their expiration date. If server access logging has been enabled for that S3 bucket, an S3.EXPIRE.OBJECT record will be generated when an object is removed.
https://aws.amazon.com/blogs/aws/amazon-s3-object-expiration/
请注意,AWS 只保证运行您不会为过期对象付费。 AWS 不提供任何保证运行过期对象实际被清理的时间。根据我的经验,这通常是 到期的一天,但是这周我 运行 遇到了生产问题,因为我的一个 Lambda 因 S3 中的对象数量而窒息由于我在存储桶上设置的生命周期策略,存储桶通常是有限的。 Amazon AWS Support 的查询证实了这一点:
Thank you for the provided information, I have checked the LifeCycle Management for the eu-west-1 region and have noted that there has been a recent increase in the number of objects to be expired. As the LifeCycle Manager is asynchronous for all S3 Buckets the region, increases in the number of objects to be expired can introduce longer delays [1].
因此,当您制定 AWSome 解决方案时,请注意这一点!
[1] https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-expire-general-considerations.html