Using Console
Using CLI
YOUR_LOG_GROUP_NAME
with the name of the log group you want to update and YOUR_RETENTION_PERIOD
with the desired retention period in days.For example, to set the retention period of a log group named “my-log-group” to 30 days, you would run:Using Python
'YOUR_LOG_GROUP_NAME'
with the name of the CloudWatch Log Group you want to update and YOUR_DESIRED_RETENTION_DAYS
with the desired retention period in days.