'Cloudwatch logs for getting insights only on weekdays

I need to get cloudwatch log insights for spot terminations on only few days of the week (ex: Friday, saturday, sunday and monday). For last 3 months, I need to get the insights, entire date range can be selected through UI, but I need to filter above few days. Any help would be appreciated.

Current query without the filter for days.

filter @message like /terminate/
| stats count(*) as exceptionCount by bin(24h) as binh
| sort binh desc

Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source