# Athena로 CloudWatch Logs query 하기

> Clean Markdown view of GeekNews topic #5684. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=5684](https://news.hada.io/topic?id=5684)
- GeekNews Markdown: [https://news.hada.io/topic/5684.md](https://news.hada.io/topic/5684.md)
- Type: news
- Author: [toughrogrammer](https://news.hada.io/@toughrogrammer)
- Published: 2022-01-04T17:08:31+09:00
- Updated: 2022-01-04T17:08:31+09:00
- Original source: [engineering.ab180.co](https://engineering.ab180.co/stories/athena-cloudwatch-logs-query)
- Points: 9
- Comments: 4

## Topic Body

- CloudWatch Logs의 아쉬운 점

    - Logs Insights를 활용해도 해결이 어려운 부분이 있음

- Athena Federated Query로 CloudWatch Logs query 시도

    - query가 너무 오래 걸리고

    - 불친절한 error log 및 문서 때문에 troubleshooting이 어려움

- 결국 클래식한 방법인 Firehose로 S3에 unloading 하고 Athena로 query

    - 이 방법에서 고려했던 사항들

        - Firehose dynamic partitioning

        - Athena partition projection

        - Firehose buffer size & interval

    - 주의 사항

        - CloudWatch Logs subscription filter 개수 제한

        - Log format

        - 비용

- IaC

    - Athena table DDL을 terraforming

## Comments



### Comment 8260

- Author: toughrogrammer
- Created: 2022-01-04T17:09:35+09:00
- Points: 1

bullet list를 다단계로 썼는데 포맷이 깨지네요... whitepsace, tab 두가지 시도해봤는데도 마찬가지여서 일단 그냥 뒀습니다. 양해 부탁드립니다.

### Comment 8262

- Author: xguru
- Created: 2022-01-04T17:16:06+09:00
- Points: 1
- Parent comment: 8260
- Depth: 1

아 지금은 그게 안됩니다. 차후에 마크다운 지원할테니 좀 기다려주세요~

### Comment 8263

- Author: toughrogrammer
- Created: 2022-01-04T17:22:12+09:00
- Points: 1
- Parent comment: 8262
- Depth: 2

오 기대됩니다! 항상 감사하게 서비스 잘 이용하고 있습니다.

### Comment 8261

- Author: toughrogrammer
- Created: 2022-01-04T17:12:06+09:00
- Points: 1
- Parent comment: 8260
- Depth: 1

댓글 추가하고 나서 다시 한 번 시도해보려고 했으나 글 삭제가 안 되네요. 댓글이 있으면 글 삭제가 안 되나 봅니다.
