Classmethod Cloudwatch Logs Insights New 2026 June
CloudWatch Logs Insightsに追加された新コマンド・関数23個を検証してみた(2026年6月版)
- URL: https://dev.classmethod.jp/articles/cloudwatch-logs-insights-new-commands-functions-2026-june/
- 日付: 2026-06-10
- Tier: Tier 2
- 要旨: 2026年6月8日にCloudWatch Logs Insightsに追加された23個の新機能を実機検証。5月の13個(ログ整形・閲覧系)に続き、今回はハッシュ・IP判定・型変換・時系列分析・CSV/XMLパース等の「分析基盤」系機能が中心。Athena/pandas/Splunkで後処理していた作業がCWL Insights内で完結可能に。
詳細
新機能一覧(2026年6月追加)
| 分類 | 機能 |
|---|---|
| Hash | md5, sha256 |
| String | strcontains(case-insensitive対応), split |
| Conditional | if |
| Conversion | toNumber, toInt, toLong, toDouble |
| IP | ipv4ToNumber, isPrivateIP, isPublicIP, isReservedIP |
| Analytics | rate, count_over_time, sum_over_time, offset, histogram |
| Parse | parse CSV, parse XML, parse multi, values, addtotals |
| その他 | limit any N, statsコマンド最大10段 |
5月vs6月の方向性比較
- 5月(13個): 「ログを読む・探す」→目視確認・手動デコードの代替
- 6月(23個): 「ログから答えを出す」→Athena/pandas/Splunkでの後処理の代替
注目機能と検証結果
md5(user_id): ユーザーIDのハッシュ化表示が可能split(tags, ','): カンマ区切り文字列を配列に展開if(toNumber(response_time) > 1000, 'slow', 'fast'): 三項演算子相当isPrivateIP,isPublicIP: IPアドレス分類でセキュリティ監査に活用histogram,rate,count_over_time: 時系列分析をCWL Insights内で完結
検証で確認した挙動差異
strcontainsの第3引数true(case-insensitive): シンタックスエラーにはならないが効果を確認できず(実装未完またはドキュメントと挙動が相違)