The lifecycle configuration yaml template snippet must delete all existing previous versions as well as current versions from now on. The versioning is suspended for this bucket. Any help is highly appreciated.
Asked
Active
Viewed 341 times
0
-
I dont think cloudformation can do that. – Arun Kamalanathan Sep 02 '20 at 02:55
-
@ArunK any ideas or suggestions to try to achieve that? – PainPoints Sep 02 '20 at 03:05
-
Adding to @ArunK point, Lifecycle configuration mgmt policy does not delete all versions. It just puts a delete marker to the latest version and all other versions still exists in the bucket. – CK__ Sep 02 '20 at 03:05
-
@ChandanKumar what would be the best way to achieve this ? – PainPoints Sep 02 '20 at 03:06
-
You have to use AWS SDK or CLI, let me know if that works for you. – CK__ Sep 02 '20 at 03:13
-
@ChandanKumar OMG thats going to be a lot of files. – PainPoints Sep 02 '20 at 03:17
-
cant you simply create a life cycle policy to delete all previous versions in 1 day? you could do this directly on s3 console – Arun Kamalanathan Sep 02 '20 at 03:23
-
@PainPoints no, no you don't need to go through all the files and delete one by one. It just a API call, checkout my answer. Though it may take some time if you have more files but this behaviour is expected even if you use any other method(other SDK). – CK__ Sep 02 '20 at 03:26