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

推荐订阅源

量子位
Stack Overflow Blog
Stack Overflow Blog
人人都是产品经理
人人都是产品经理
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Vercel News
Vercel News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Y
Y Combinator Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
V
Visual Studio Blog
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
博客园 - 司徒正美
B
Blog RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
L
LangChain 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
Day 2 — Cost Controls
Ismail G. · 2026-05-04 · via DEV Community

When setting up infrastructure for a startup, cost control is not something to “add later.” It has to be built into the foundation from the very beginning.

AWS operates on a pay-as-you-go model. That flexibility is powerful, but it also means that a small misconfiguration, an unused resource, or an unexpected traffic spike can quickly turn into a serious bill.

On Day 1, we focused on security (root user, IAM, MFA).
On Day 2, we make sure we never get surprised by costs.

Avoid unexpected AWS bills by setting up:

Budget alerts
Cost anomaly detection
Billing alarms

Step 1 — Create a Budget

The first and most important control is a simple monthly budget.

Navigate in AWS Console

Go to:

Billing → Budgets → Create budget

Budget Setup

Choose:

Budget type: Cost budget
Period: Monthly

Configure Alerts

Creating a budget alone is not enough.
Alerts are what make cost control actually useful.

Recommended setup:

60% of budget → Email notification
80% of budget → Email + SNS notification
100% of budget → Critical alert

To configure alerts properly, switch from the simplified template to:

Customize (advanced)

This allows you to define precise thresholds and notification behavior.

After selecting Customize (advanced) and setting your budget amount:

Scroll down to the Alerts section
Click Add an alert threshold

Recommended Alert Setup (Best Practice)

To get full visibility, configure three alert levels:

  1. 50% — Early Warning Threshold: 50% Type: Actual cost Notification: Email

This is your first checkpoint.

It helps you detect:

Unused resources
Misconfigurations
Unexpected usage

  1. 80% — Risk Level

Threshold: 80%
Type: Actual cost
Notification: Email + SNS (optional)

At this stage, you should actively investigate your spending.

  1. 100% — Critical

Threshold: 100%
Type:
Forecasted cost

This is the most important alert. The forecasted cost option allows AWS to warn you before you actually exceed your budget.

If you see your budget and alert thresholds, this step is complete.

Step 2 — Cost Anomaly Detection

Budgets are static. They only track thresholds.

But what if something unusual happens before reaching your budget?

That’s where anomaly detection comes in.

Navigate in AWS Console

Go to:

Billing → Cost Anomaly Detection

Create a cost monitor:

Choose Monitor Type:

Choose Managed by AWS:

AWS automatically analyzes your historical usage
It learns your normal spending patterns
It detects anomalies without manual configuration

This is the best choice for startups and early-stage setups.

Select AWS Services for Monitor Dimension. This will:

Track spending per service (EC2, S3, RDS, etc.)
Detect anomalies within each service

Configure alert subscriptions

An alert subscription notifies you when a cost monitor detects an anomaly. Depending on the alert frequency, you can notify designated individuals by email or Amazon SNS.

  1. Create a New Subscription

  2. Subscription Name

Use something descriptive:

Cost-Anomaly-Alerts
Startup-Billing-Alerts
DevOps-Cost-Monitor

This becomes important when you have multiple teams or monitors.

  1. Alerting Frequency

AWS gives you 3 options:

Individual Alerts
You get notified immediately when an anomaly is detected

Best for production environments and critical cost control.

Daily Summaries:
AWS groups anomalies and sends once per day

Best for low-noise monitoring and early-stage setups.

Weekly Summaries:
Lowest noise, but slow response

Blog recommendation

Use Individual alerts if you want real-time control.
Use Daily summaries if you want less noise.

  1. Alert Recipients, write here the email address.

  2. Threshold

When configuring the threshold, you can choose between an absolute amount or a percentage above expected spend. Amount-based thresholds are better for controlling real financial impact, while percentage-based thresholds are more effective at detecting unusual behavior relative to your normal usage.

Choose: When the anomaly impact is 25.00% above the expected spend, you receive anomaly alerts.

CloudWatch Billing Alarm

If your goal is simply to track spending and receive alerts, AWS Budgets is enough and you do not need CloudWatch alarms. CloudWatch billing alarms become useful when you need automation, integrations, or real-time operational responses.

In most startup setups, Budgets handle visibility, while CloudWatch is added later for advanced control.