Hey
Just a quick note on this line:
|
if echo "$AWSregions" | egrep -iq "error|not"; then |
According to the AWS CLI docs for describe-regions, region states include:
opt-in-not-required
opted-in
not-opted-in
If the intention is to filter out only not-opted-in regions, the current check egrep -iq "error|not" may be a bit too broad—it could accidentally match opt-in-not-required, which seems like a valid region.
Maybe something like this would be more accurate?
if echo "$AWSregions" | egrep -iq "error|not-opted-in"; then
Just a small suggestion—great script otherwise!
Hey
Just a quick note on this line:
aws/cloudwatch-logs-cleanup.sh
Line 109 in 68b2dbb
According to the AWS CLI docs for describe-regions, region states include:
opt-in-not-requiredopted-innot-opted-inIf the intention is to filter out only not-opted-in regions, the current check
egrep -iq "error|not"may be a bit too broad—it could accidentally matchopt-in-not-required, which seems like a valid region.Maybe something like this would be more accurate?
if echo "$AWSregions" | egrep -iq "error|not-opted-in"; thenJust a small suggestion—great script otherwise!