2022-05-02 Rails Tutorial 7th Edition / CloudWatch Logs Insights でログにクエリする
Rails Tutorial 7th Edition
Rails Tutorial の 7th edition Draft が出てたので購入しておいた » Ruby on Rails Tutorial | Learn Enough to Be Dangerous https://t.co/jEJMzDpZEl
— toshimaru (@toshimaru_e) May 2, 2022
CloudWatch Logs Insights でログにクエリする
CloudWatch Logs Insightsを活用してRDBMS頼りな集計処理を辞めてみる | Skyarch Broadcasting
$ aws logs start-query \
--log-group-name '/test/log' \
--start-time 1625721144 \
--end-time 1625731144 \
--query-string 'fields @timestamp, userID, shopID, price
| stats sum(price) by userID
| sort by userID'
{
"queryId": "6110a423-15b3-45e2-8477-ae664bdce615"
}
$ aws logs get-query-results
--query-id '6110a423-15b3-45e2-8477-ae664bdce615'