Add the following snippet at the bottom of ~/.zshrc file.
RPROMPT='[%D{%L:%M:%S}] '$RPROMPT
| # this script queries aws logs with insights filtering on ERROR | |
| # explanation of start and end times | |
| #--start-time = unix timestamp 30 mins in the past | |
| #--end-time = unix timestamp now | |
| QUERY_ID=$(aws logs start-query \ | |
| --profile $profile \ | |
| --log-group-name /aws/lambda/aap-event-consumer-dev \ | |
| --start-time `date -v-30M "+%s"` \ |