- Newest
- Most votes
- Most comments
Assuming there are no overlapping lifecycle rules, each rule starts to get executed at midnight in the UTC time zone. That's an absolute time, not otherwise related to how much time has passed since the object was uploaded.
As for the tagging, did you check that the objects that you expected to get transitioned, but didn't, had the correct tag key and value, specifically having the correct case and no empty spaces at the end, for example?
The actual implementation of lifecycle rules can take many hours. It's not unusual to see even simple expiration actions still not having got fully completed at 18:00 UTC (meaning 18 hours after midnight), even if some objects have been processed. S3 is a massively distributed, massively multitenant system, so it's quite normal to see bulk operations only partially completed and not happening at any specific moment but only eventually.
From a cost standpoint, the transitions will still take effect at the time they were scheduled to happen. For example, if you set a lifecycle rule to transition the objects 1 day after creation and upload an object at 6:15 p.m. Eastern Daylight Time (UTC-4) on Thursday, which is 22:15 UTC on Thursday, then the object will be considered as eligible for the transition action exactly 24 hours after that time, meaning at 22:15 UTC on Friday. The execution of the lifecycle rule will start at 0:00 UTC on Saturday. The transitions will typically complete sometime during Saturday, but some objects or even many of them may also take longer, even a couple of days longer, to finish getting processed.
That's partly because if any transient issue within S3 is preventing it from completing an action, it's more economical for it to skip it than to get stuck retrying an operation that is likely to keep failing for some time, until it's automatically remedied. Doing the normal processing the next day is a simple and elegant way to deal with such issues.
For billing purposes, however, all the objects that were eligible to be transitioned at 0:00 (midnight) UTC on Saturday will be considered as having been transitioned at that time, regardless of when the action actually completes for each object.
I set the rule for the prefix and tags at the same time and the tag ones are not getting called, but the prefix one works without an issue, I have checked the tags and they match with the rule I set on the objects.
Could you open CloudShell in the region where your bucket is located, run these CLI commands there, and share the output (with anything sensitive redacted) and the exact value of the "key" parameter for the first command. The name of the bucket we don't need to know.
aws s3api get-object-tagging --bucket my-bucket-name --key object-key-not-transitioning
aws s3api get-bucket-lifecycle-configuration --bucket my-bucket-name
Relevant content
- asked 2 years ago
