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 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则