How to set Log Retention Expire to Log Group by boto3 or AWS CLI?

0

Hello, guys.

Thank you for your help in advance.

I would like to know how to set Log Retention Expire by boto3 or AWS CLI to Log Group.
If you know how to do that, please teach it to me.

Thank you.

koki-n
feita há 4 anos862 visualizações
1 Resposta
1

Hello,

Both boto3 and AWS CLI support CloudWatch Logs put-retention-policy.

Boto3 put_retention_policy() documentation: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/logs.html#CloudWatchLogs.Client.put_retention_policy

AWS CLI put-retention-policy documentation: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/logs/put-retention-policy.html

Best,
Kevin

AWS
respondido há 4 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas