pulumi-cloud
pulumi-cloud copied to clipboard
Make log retention configurable
Today we hardcode log retention for functions and services at 1 day, and rely on the log aggregator as the only long term storage of logs.
We should at least make this configurable, and should possibly default to retaining all logs, with the option to opt-in to expiring logs for cost savings if users want to opt-in to it.
Want to chime in here and describe our observations 🙂Creating Lambda functions via cloud.timer.interval and cloud.timer.daily, etc. will create log groups without a configured retention policy. The AWS console states them as Never Expire.
Note: in teh awsinfra work i'm doing, a TaskDefinition's logGroup can be provided by teh user, giving them full control over this. So the potential work items here are:
- Do we provide a way when creating an aws.CallbackFunction to configure logging? Right now, we do not seem to do anything special with setting up logging there, and we might want to consider it.
- Do we provide some mechanism at the Cloud layer to control this?
- if we do provide a mechanism for this at the Cloud layer, is it some sort of global mechanism, or is it something you can somehoe configure on a per lambda basis?
This issue is still present - there is no way to configure the retention period for Lambdas created with Pulumi