awslabs / rds-snapshot-tool

The Snapshot Tool for Amazon RDS automates the task of creating manual snapshots, copying them into a different account and a different region, and deleting them after a specified number of days
Apache License 2.0
341 stars 146 forks source link

Added CW Logs groups with configurable retention period, and SourceURL #12

Closed pacohope closed 5 years ago

pacohope commented 5 years ago

When Lambda functions run, default CloudWatch Log groups get created for their logs. The default retention period for those log groups is infinite. I think it's better to have a time-limited set of CloudWatch logs. I added a configurable parameter with a default of 7 days. I added CFN to create the log groups explicitly, which enables setting the RetentionInDays property.

As an unrelated but helpful bit of documentation, I added a CloudFormation Output from the stack that simply points to the URL for the master repository. That way, if someone finds this running in an account and they're wondering where it came from, it will be easier to spot. Happy to discuss.