aws logs put-retention-policy
Sets the retention of the specified log group. AWS CLI reference
2 options Its page in the AWS CLI reference
Options
--log-group-nameThe name of the log group.--retention-in-daysThe number of days to retain the log events in the specified log group.