-1

We have a AWS bucket NPI_Recovery_Tool, which contains two folders Input and Output. We have set up one expiration policy to cleanup the file after every 30 days of file creation in Input and Output folder. Under file cleanup policy configuration we have set the prefix and tabs as NPI_Recovery_Tool/Input, as we need to delete the file under Input folder. But it deleted the entire NPI_Recovery_Tool folder. Please help and suggest.

mayank gupta
  • 341
  • 1
  • 4
  • 16

1 Answers1

0

From the information given, I assume the below things for my answer. Bucket Name: NPI_Recovery_Tool

Two folders created inside this bucket: Input and Output

Note: While adding prefix, you should not include bucket name

So if you want to delete the files under Input folder the prefix should be Input

FYI: S3 is always a key object store, and folders constitute the name of the key while accessing any objects inside it.

References:

  1. http://docs.aws.amazon.com/AmazonS3/latest/user-guide/create-lifecycle.html
  2. http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys
deadzg_devil
  • 376
  • 2
  • 10
  • great.. But what if I have buket structure like this Phynder/NPI_Recovery_Tool/Input/ .. so then prefix would be NPI_Recovery_Tool/Input/ correct ? – mayank gupta Sep 26 '17 at 02:06
  • If your bucket name is **Phynder** , then yes the prefix would be **NPI_Recovery_Tool/Input/** – deadzg_devil Sep 26 '17 at 18:17