It doesn't look like per-object expiration is supported, but rather a per-bucket lifecycle configuration with up to 100 rules per configuration, as you have found.
A bucket has one lifecycle configuration. A lifecycle configuration
can have up to 100 rules.
The lifetime value must be a nonzero positive integer. Amazon S3
calculates expiration time by adding the expiration period specified
in the rule to the object creation time and rounding the resulting
time to the next day midnight UTC.
If per file expiration is not supported, is it possible to exclude a
file that matches an expiration prefix from being expired ?
It doesn't look like you can overlap rules, either.
Take care to ensure the rules don't overlap. For example, the
following lifecycle configuration has a rule that sets objects with
the prefix "documents" to expire after 30 days. The configuration also
has another rule that sets objects with the prefix "documents/2011" to
expire after 365 days. In this case, Amazon S3 returns an error
message.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…