I created Amazon Simple Storage Service (Amazon S3) Lifecycle configuration rules and want to troubleshoot issues with objects that didn’t transition or expire.
Short description
Amazon S3 Lifecycle object transitions and object expirations are asynchronous operations. There's a delay between when Amazon S3 applies the S3 Lifecycle rule and when the action for the rule is complete. For more information, see Why isn't the lifecycle rule on my Amazon S3 bucket working even though I applied it more than one day ago?
To set up an S3 Lifecycle configuration rule, see How to set an S3 Lifecycle configuration.
Resolution
To resolve this issue, check the following settings in your S3 Lifecycle configuration rule.
S3 Lifecycle configuration rule prefixes and wildcards
If you use prefixes, then make sure that the path you entered in the filter matches the prefix path in your Amazon S3 bucket.
Case sensitive structure
The S3 Lifecycle configuration rule is case sensitive and acts on the string that you entered. However, the rule doesn't act when it can't find a matching path in your S3 bucket.
For example, if the prefix in your bucket is <Prefix>sales1999/</Prefix> and you specified <Prefix>Sales1999/</Prefix> in your S3 Lifecycle rule, then the rule doesn't take effect. You must use a lowercase "s" in the prefix filter for the rule to act.
Leading slashes
Add leading slashes in the prefix filter only when your bucket prefix uses leading slashes in its prefix structure.
If you specified <Prefix>/sales1999/</Prefix> in your S3 Lifecycle rule and the prefix in your bucket is <Prefix>sales1999/</Prefix>, then the rule doesn't take effect. For more information, see How can I include multiple prefixes in my lifecycle rule?
Wildcards
You can't use wildcards "*" in your S3 Lifecycle configuration rule prefixes. If you have prefixes that start with the same characters, then you can include all the prefixes in your rule. To do this, specify a partial prefix with no trailing slash (/) in the filter. For more information, see Configuring event notifications using object key name filtering.
S3 Lifecycle supported object transitions
Amazon S3 associates objects with different tiers of storage classes and defines the objects in a waterfall model. You can transition objects only down the waterfall model, not up. For example, you can transition objects from an S3 Standard class to a S3 Standard-IA class. However, you can't transition objects from an S3 Standard-IA class to a S3 Standard class.
You can't transition objects that are smaller than 128 KB that you created after September 2024. However, you can add a minimum size ObjectSizeGreaterThan or a maximum size ObjectSizeLessThan filter that specifies a smaller size to the configuration. For more information, see Example: Allowing objects smaller than 128 KB to be transitioned.
Note: You can transition unmodified S3 object configurations that you created before September 2024 and are smaller than 128 KB to S3 Glacier and S3 Glacier Deep Archive. It's a best practice to add a filter that specifies a smaller size for the configuration to avoid a transition cost.
You can't transition objects that you store for less than 30 days to the S3 Standard-IA or S3 One Zone-IA storage classes. You can't transition any objects to the Reduced Redundancy Storage (RRS). You also can't transition any versioned objects with a Pending replication status.
Related information
How do I create Amazon S3 lifecycle configuration rules for noncurrent object versions?
How do I use a lifecycle configuration rule to empty an Amazon S3 bucket?
How can I verify an Amazon S3 lifecycle configuration rule for cleaning up incomplete multipart uploads?
Comparing the Amazon S3 storage classes