mlevit / aws-auto-cleanup

Programmatically delete AWS resources based on an allowlist and time to live (TTL) settings
MIT License
495 stars 54 forks source link

DynamoDB values are overwritten each time the app runs #10

Closed ghost closed 5 years ago

ghost commented 5 years ago

Each invocation of the app will overwrite all records in the two DynamoDB tables with the default values (new records will no be altered).

atqhg23 commented 2 years ago

I have a question about this issue, just to make sure I am understanding correctly. Every time the app lambda was invoked, this would overwrite all the default values like TTL, regions targeted, permanent whitelist items etc., but would keep new whitelist items that were added the same?

Just wanted to make sure since I am interested in overwriting the default values every time the lambda is invoked (but keeping new whitelist items the same) so this way these default values have to be managed through the code.

mlevit commented 2 years ago

@mcueva10 the auto-cleanup-settings.json file contains a version key. That key is compared when the application is run and the data is inserted if the key in the file is greater than in the table. This generally only occurs when I add support for a new service.

The whitelist is inserted each time.

atqhg23 commented 2 years ago

Oh ok thanks