Amplify, set retention policy for automatically created log groups

0

I'm just starting with Amplify, I noticed that upon deployment amplify push there are a set of log-groups being created. All these log-groups are configured so their content never expires.

I'd like to configure all these log groups to retain logs for one week only, in order to reduce costs.

I know I could access the console and configure the log groups manually; but besides the manual solution, what I'd like to do is to configure the project in such a way that I wouldn't need to remember to update log retention policy.

In serverless I used to leverage this on a plugin about log retention, that updates the CloudFormation template so all log-groups contain a retention policy.

Is there any way to define such values? If there's no option to configure the values, what could be some alternatives to automate this setup?

已提問 1 年前檢視次數 61 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南