Devesh mehta
Devesh mehta

Reputation: 1523

How to use regex in the AWS S3 Lifecycle Expiration Prefix Rule

s3 bucket with "folders" 5.10, 5.11, 5.12, 5.13. I would like to create a rule using regex like /*/5.1[1-3]/ to archive folder 5.11, 5.12 and 5.13.

can anyone suggest how can I achieve this using terraform.

Thank you in advance.

Upvotes: 1

Views: 1264

Answers (1)

Marcin
Marcin

Reputation: 238957

Sadly its not possible. S3 lifecycles rules do not support regular expressions.

You have to explicitly different rules for different prefixes.

Upvotes: 2

Related Questions