デフォルトだと not expired である. 既に retention period が設定されている log を除き一括で 30d とかをさらっと設定しておく. Logs と併せ自動生成されるので, 後で Lambda 化して boto3 で書きます.
% aws --version aws-cli/1.18.1 Python/3.7.1 Linux/4.4.0-18362-Microsoft botocore/1.15.41
#!/bin/sh retention="30" profile="" region="ap-northeast-1" for log in $(aws logs describe-log-groups \ --query 'logGroups[?!not_null(retentionInDays)] | [].logGroupName' \ --region ${region} \ --profile ${profile} \ --output text) do aws logs put-retention-policy --log-group-name ${log} \ --retention-in-days ${retention} \ --profile ${profile} done
CloudTrail とかの CW Log は never expired で良さそう.