惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
Jina AI
Jina AI
雷峰网
雷峰网
Blog — PlanetScale
Blog — PlanetScale
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
博客园 - 司徒正美
罗磊的独立博客
J
Java Code Geeks
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
Vercel News
Vercel News
A
About on SuperTechFans
I
InfoQ
D
DataBreaches.Net
爱范儿
爱范儿
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Building an Application Log Analytics Platform with Amazo...
Manato Takai · 2026-06-01 · via DEV Community

Introduction

Our team had been using CloudWatch Logs as the log storage layer for our identity management system, but as the service grew, the associated cost became a concern. This article describes how we built and migrated to a log storage architecture using Amazon S3 Tables, referred to here as S3 Tables, and the cost optimization results we achieved.

Rising CloudWatch Logs Costs as the Service Grew

Amazon CloudWatch Logs, referred to here as CloudWatch Logs, is an AWS service for storing and analyzing logs. In many common architectures, application logs are stored directly in CloudWatch Logs. When an issue occurs, teams query logs using CloudWatch Logs Insights and configure alerts for specific error logs in combination with CloudWatch Alarms. Our identity management platform followed a similar pattern. Logs from ECS were delivered to CloudWatch Logs through a log router, and we used Amazon Managed Service for Grafana, referred to here as Grafana, for day-to-day development and operations.

As our services grew, the identity management platform, which handles authentication and authorization requests across all services, saw a corresponding increase in request volume and feature scope. As a result, logging costs grew to a level that could no longer be ignored. We had made steady improvements through weekly reviews by removing unnecessary logs and consolidating others, but these efforts alone were not enough to achieve substantial cost optimization. We therefore began considering a more fundamental solution.

The main costs incurred during normal CloudWatch Logs operations can be grouped into three categories: log ingestion, storage, and queries. As the pricing table also shows, log ingestion is the primary driver of cost. This meant that even if we optimized retention periods and other storage-related settings, log costs would continue to increase in proportion to request volume.

We therefore considered ingesting and storing logs in S3 Tables, which appeared to offer a reasonable balance between cost and operational usability.

Amazon CloudWatch Pricing

Migration to Amazon S3 Tables

What is Amazon S3 Tables?

S3 Tables is an AWS service that implements Apache Iceberg, an open table data format. As shown in the diagram below, Iceberg manages metadata for files stored in the Iceberg format, which represent the actual data. This allows query engines such as Amazon Athena and Spark to read and write the data as tables. Because the table structure is abstracted through metadata, Iceberg supports flexible changes to table schemas such as partitions and columns. It also provides time travel capabilities based on snapshot-managed metadata history, allowing past data to be queried. In addition, it addresses several limitations of the Hive format traditionally used in data lakehouse architectures. For more detail, I recommend reading the official Apache Iceberg site.

Unlike CloudWatch Logs, S3 Tables does not allow data to be queried flexibly without defining a schema in advance. Even so, we decided to migrate to S3 Tables after considering several advantages: the ability to search logs using familiar SQL syntax, the cost benefits of using low-cost S3 storage, the ability to delegate routine Iceberg operations such as compaction to a managed service, and the flexibility to adapt to future changes in log structure through schema evolution.

Iceberg Architecture (cite: https://iceberg.apache.org/spec/#overview)

Gradual Migration Using a Log Delivery Pipeline

Before the migration, we sampled several logs from CloudWatch Logs, loaded them into S3 Tables, and validated the setup. However, we still did not know how practical it would be in real operations, so we migrated gradually using the following process.

  1. After logs from ECS were received by the log router, the log router delivered them to both CloudWatch Logs and Amazon Data Firehose to S3 Tables.
  2. We changed the query destination in Grafana, which we use as our monitoring tool, to S3 Tables and identified usability issues and operational concerns through day-to-day use.
  3. Once we determined that operations with S3 Tables were viable, we changed the log router destination to S3 Tables. Error logs continued to be delivered to CloudWatch Logs because they were also used for alerts.

With this approach, even if we discovered that S3 Tables was not suitable for our operations, logs stored in CloudWatch Logs would remain available and queryable without data loss. This allowed us to migrate safely.

Cost Optimization Results After Migrating to S3 Tables

After we stopped delivering logs other than error logs to CloudWatch Logs, we quickly saw a significant cost optimization effect. The cost of log ingestion, which had been the main cost driver, was reduced by more than 80 percent. Query costs also decreased substantially after moving from CloudWatch Logs Insights to Athena.

Current Technical Constraints in S3 Tables and the Surrounding Ecosystem

Changing Partitions in S3 Tables

S3 Tables partitions cannot be changed from Athena. Therefore, if you want to modify the partition configuration after table creation, you need to write a Spark query using an AWS Glue job or execute DDL from another Iceberg client. Since Athena already provides a managed query service, this is an area where I would like to see improvement in the future.

Additional Athena operations for querying Iceberg tables

How to add partition fields to an Iceberg table

When Intelligent Tiering Can Be Enabled

Although S3 Tables has lower storage costs than CloudWatch Logs, costs still increase day by day as logs accumulate. S3 Tables supports Intelligent Tiering, announced in December 2025, which automatically optimizes the storage class of files that have not been accessed for a defined period. If appropriate partitions are in place, logs are often accessed primarily for recent time ranges, so older logs can be moved to a different storage class and further cost optimization can be expected.

However, Intelligent Tiering can only be configured when a table is created. A table created with standard storage cannot be changed later. In most cases, Intelligent Tiering should be the right choice, so it is worth making sure it is configured from the start. We recreated the table with considerable regret.

Notes on Building with Terraform

Our team uses Terraform to manage AWS infrastructure. We rely heavily on the modules provided by hashicorp/terraform-provider-aws, but not all API parameters around S3 Tables are supported yet. For example, pull requests have been opened for the partition settings and Intelligent Tiering settings mentioned earlier, but they have not yet been merged. A pull request I previously submitted for Athena managed query results support took about three months to be merged. If these features are important to you, consider reacting to the relevant pull requests and communicating your interest in Iceberg to the maintainers.

https://github.com/hashicorp/terraform-provider-aws/pull/46015

https://github.com/hashicorp/terraform-provider-aws/pull/46532

Conclusion

This article introduced our experience migrating application log storage from CloudWatch Logs to S3 Tables for cost optimization. CloudWatch Logs is highly usable and easy to adopt, so I would still choose CloudWatch Logs by default in the early stages of application development. At the same time, logging costs tend to grow as an application scales. When that happens, S3 Tables is worth considering as one of the options for log storage.