A deep dive into AWS Cost Explorer - Monthly
vs Hourly Costs by AWS Service.
Focus:
- Tailored for DevOps / FinOps.
Breakdown:
- Intro,
- Enabling
Hourly Granularity,
- Steps-by-step
setup from AWS console,
- Viewing Monthly vs. Hourly Costs by AWS Service,
- The
Basics: Hourly vs Monthly,
- What
Hourly
Cost by Service Tells,
- What
Monthly
Cost by Service Tell,
- How
AWS Cost Explorer Shows These Views,
- Sample
Analyses,
- Interpreting
Spikes & Drops,
- Combining
Hourly + Monthly Views,
- Professional
Tips,
- Insights.
Intro:
- Cost
explorer allows
twtech to manage cloud costs, understand how its AWS spend
behaves over time (hourly/MonthlY)… what services contribute most and
what is critical to be cut-back.
- AWS Cost Explorer gives therefore, provides a powerful ways to
slice twtech usage and costs, especially by hourly and monthly views.
- To view costs in Cost Explorer by AWS service on a monthly or
hourly basis, twtech must first enable the hourly granularity
feature (for hourly views), and then modify the report's time
granularity setting.
Enabling
Hourly Granularity
- By
default, Cost Explorer provides monthly and daily granularity for up to 14 months of data.
- Hourly data must be explicitly enabled, is a paid feature, and is only available for the past 14 days.
Steps-by-step setup from AWS console
1 Sign in to the AWS Management Console and navigate to the Billing and Cost Management dashboard.
2. In the navigation pane, under Cost Management, choose Cost Explorer, and then select Preferences.
3. In the Cost Explorer Preferences, enable Hourly granularity.
4. Once enabled, hourly data typically becomes available within 48 hours.
Viewing
Monthly vs. Hourly Costs by AWS Service
After enabling the feature, twtech can adjust the
view in your reports:
1. In the Cost Explorer navigation pane, choose Cost Explorer and then Reports (or access a pre-built report like Monthly costs by service).
2. In the report parameters on the right side of the screen, find the Granularity option.
3. Use the dropdown menu to select either Monthly, Daily, or Hourly to change how twtech costs would be aggregated.
4. To ensure the costs are broken down by service, check the Group by option and select Service.
5. Set the desired Date range using the calendar tool. Remember, hourly data is only available for the past 14 days.
NB:
- This configuration allows twtech to monitor cost and usage patterns at a granular level (hourly for immediate analysis) or a broad level (monthly for long-term trends).
The Basics: Hourly vs Monthly
|
Dimension |
Hourly Cost |
Monthly Cost |
|
|
Granularity |
High (per hour) |
Low (per month) |
|
|
Use Cases |
Short-term peaks, autoscaling, spikes |
Overall budgeting, trend tracking |
|
|
Noise Level |
High |
Smoothed over time |
|
|
Best For |
Spot instances, Lambda invocations, autoscaling clusters |
Monthly billing, budget forecasting |
|
What Hourly Cost by Service Tells
·
Hourly breakdown shows costs attributed to each AWS
service in each hour of the day.
Why It Matters
- Detect spikes in cost due
to scaling events, deployments, backups.
- Understand daily
patterns:
e.g., high EC2 usage during
business hours.
- Identify abnormal
activities: sudden
Lambda execution surges at odd hours.
- Spot unused/overprovisioned resources
that
bill continuously (e.g., unattached EBS
volumes showing steady cost even at night).
Good For
- Dev/Test
environments
- Autoscaling
behavior analysis
- Real-time
alerts
- Short-term
cost optimizations
What Monthly Cost by Service Tell
·
Monthly view
aggregates all costs incurred in a calendar month per service.
Why It Matters
- Budget tracking against
planned spend
- Compare month-over-month trends (growth, anomalies)
- Evaluate impact of architectural changes (e.g., moving from on-prem to AWS)
- Chargeback/showback to Org teams
Good For
- Forecasting
& budgeting
- Executive
reporting
- Long-term
optimization planning
How AWS Cost
Explorer Shows These Views
1. Selecting the Time Granularity
In Cost Explorer:
- Time unit = Hourly
(Hourly granularity) – Shows cost per service broken out by hour
- Time unit =
Monthly (Daily/Monthly granularity) – Shows aggregated daily or
monthly totals
NB:
- Hourly isn’t
available for all time ranges — usually twtech chooses a shorter window (e.g., last 7/30 days).
2. Group By Service
- twtech can group Cost Explorer chart by AWS Service to see how
each contributes to the total in its chosen period.
3. Filtering
Apply filters such as:
- Linked accounts
- Regions
- Tags (e.g., Environment:
Production)
- Usage types (Compute,
Storage)
NB:
·
This
gives deeper insight into service-level cost behavior.
Sample Analyses
Example 1: Hourly EC2 Cost Pattern
Scenario: twtech sees spikes every day at ~2 PM.
What to check:
- Are new EC2
instances being launched for batch jobs,
- Are
autoscaling policies set too aggressively,
- Is there a cron
job triggering resource use.
Actionable Insight: Tune autoscaling thresholds or reschedule heavy tasks to off-peak
hours.
Example 2: Monthly S3 Cost Trend
Scenario: S3 cost jumps
40% month-over-month.
What to check:
- Growth in
stored data,
- Transition
rules not triggering,
- Frequency of
GET/PUT operations.
Actionable Insight: Review lifecycle policies, remove old/unused data, enable
intelligent-tiering.
Interpreting Spikes & Drops
Spike in Hourly Cost
Common causes:
- Sudden
traffic surge
- Deployment of
larger instance types
- Unintended
autoscaling behavior
Fixes:
- Right-size
resources
- Use scaling
policies with cooldown periods
- Spot pricing
+ savings plans
Drop in Monthly Cost, But Still Large Hourly
Spikes
This can mean:
- Overall spend
is lower, but specific tasks still expensive per hour.
- Example: you
switched to Fargate, which can cost more per runtime hour.
Fix:
- Look at service mix; compute vs storage vs data transfer.
Combining Hourly + Monthly Views
For advanced cost governance, combine both:
|
Strategy |
Example Question |
|
Hourly anomaly detection |
What hours cause cost spikes vs expected baseline? |
|
Monthly trend analysis |
Is our database service cost trending upward permanently? |
|
Optimizing autoscaling |
Can we smooth hourly peaks to reduce next month’s total? |
|
Team chargeback |
Which team’s services cost the most per month? |
Professional Tips
Use Tags Everywhere
·
Tag
all resources (env, app,
team, cost center).
·
Cost Explorer can then show tag-filtered cost trends both hourly
and monthly.
Set Budgets & Alerts
Use AWS Budgets to send alerts when:
- Daily spend exceeds threshold
- Hourly trend breaks expected pattern
Export Cost & Usage Reports (CUR)
- CUR gives detailed line items that can be processed in Athena/QuickSight for custom hourly and monthly reports.
Combine with Cost Anomaly Detection
- AWS Cost Anomaly Detection can send alerts for unusual hourly or monthly spikes.
When to Use Each in Workflow
|
Team |
Primary Focus |
Preferred View |
|
FinOps |
Predict
spend, budget reviews |
Monthly |
|
DevOps |
Alerts,
scaling efficiency |
Hourly |
|
Engineering
Leadership |
Roadmap
impact |
Monthly + trend |
|
Cloud
Architects |
Resource
planning |
Both |
Insights:
- A practical,
step-by-step playbook to build specific AWS Cost Explorer charts for EC2 hourly vs
monthly cost analysis.
AWS Cost Explorer Charts
EC2 Hourly
vs Monthly Cost Analysis (Hands-On)
Prerequisites
- IAM
access:
ce:GetCostAndUsage,ce:GetDimensionValues - (Optional but strongly recommended): Cost Allocation Tags enabled
- Linked accounts enabled (if using AWS Organizations)
CHART 1: EC2 Hourly Cost Trend (Spike & Autoscaling Analysis)
Purpose
- Detect cost spikes
- Validate Auto Scaling behavior
- Identify wasted always-on compute
- Correlate
cost with deployments or traffic
How to Build (Console)
1.
Open AWS Cost Explorer
- AWS Console → Billing → Cost
Explorer
2.
Set Time Range
-
Last 7 daysorLast 30 days - Hourly
granularity works best ≤ 14–30 days
3.
Granularity
-
Hourly
4.
Chart Type
-
Stacked barorLine
5.
Filter
- Service →
EC2 - Compute - (Optional) Region →
us-east-2, etc. - (Optional) Linked
Account
6.
Group By
-
Usage type(recommended)
or
-
Instance type(advanced tuning)
What
twtech should See
- Hour-by-hour
EC2 spend
- Cost behavior
during:
- Business hours vs off-hours
- Scaling events
- Batch jobs
- Deployments
How twtech Interprets the data
|
Pattern |
Meaning |
Action |
|
Flat
line 24/7 |
Always-on
EC2 |
Consider Savings Plans or right-sizing |
|
Daytime
spikes |
Auto
Scaling |
Tune min/max & cooldowns |
|
Sudden
single-hour jump |
Deployment
/ batch job |
Review launch configs |
|
Night-time
costs |
Idle
resources |
Schedule shutdown |
Professional Tip
Group by Usage Type to isolate:
-
BoxUsage:*→ On-Demand EC2 -
SpotUsage:*→ Spot instances -
CPUCredits:*→ T-class misuse
CHART 2: EC2 Monthly Cost Trend (Budget & Forecasting)
Purpose
- Track EC2 spend growth
- Validate Savings Plans impact
- Support budget reviews
- Executive
reporting
How to Build
1.
Time Range
-
Last 6 monthsorLast 12 months
2.
Granularity
-
Monthly
3.
Chart Type
-
Bar chart
4.
Filter
- Service →
EC2 - Compute
5.
Group By
-
Purchase option(highly recommended)
What
twtech should See
Monthly EC2 spend split by:
- On-Demand
- Savings Plan
- Reserved
Instances
- Spot
How twtech Interprets the data
|
Insight |
What It Means |
|
On-Demand
dominates |
Missing
commitment coverage |
|
RI/SP
flat but usage grows |
Under-coverage |
|
Spot
increasing |
Cost
optimization success |
|
Month-over-month
growth |
Scale or
inefficiency |
Optimization Actions
- Buy Compute
Savings Plans
for baseline usage
- Shift burst workloads to Spot
- Right-size
instance families
CHART 3: EC2 Hourly
Cost by Auto Scaling Group (ASG)
Requires cost allocation tags
Purpose
- Identify
which services/apps drive cost
- Detect
misconfigured ASGs
Build Steps
1.
Granularity
- Hourly
2.
Filter
- Service → EC2 - Compute
3.
Group By
-
Tag→AutoScalingGroupName - or
Application,Service,Environment
Interpretation
|
Pattern |
Action |
|
One
ASG dominates |
Tune that
service first |
|
Dev
ASG costs at night |
Add
scheduled scaling |
|
Prod
ASG spikes |
Revisit
scaling policy |
CHART 4: EC2 Cost per Environment (Dev / Test / Prod)
Purpose
- FinOps
chargeback
- Enforce
environment hygiene
- Leadership
reporting
Build Steps
1.
Granularity
o
Monthly
2.
Group By
o
Tag → Environment
3.
Filter
o
Service → EC2 - Compute
Expected Results
|
Environment |
Healthy Pattern |
|
Prod |
Highest,
stable |
|
Dev |
Lower,
spiky |
|
Test |
Minimal |
Red flag:
- Dev/Test close to Prod cost.
CHART 5: EC2 Instance
Type Cost Breakdown
Purpose
- Identify
inefficient instance families
- Validate
Graviton adoption
- Right-sizing
analysis
Build Steps
1.
Granularity
o
Monthly
2.
Group By
o
Instance
type
3.
Filter
o
Service → EC2 - Compute
Optimization Insights
|
Finding |
Action |
|
Heavy
|
Consider |
|
Many
small instances |
Consolidate |
|
Legacy
families |
Modernize |
Advanced: Hourly vs Monthly Combined Strategy
|
Role |
Chart Focus |
|
DevOps |
Hourly
spikes & scaling |
|
FinOps |
Monthly
trends & commitments |
|
Cloud
Architect |
Instance
mix |
|
Leadership |
Monthly
summary |
Next-Level (Highly Recommended)
1,
Export Cost & Usage Report (CUR)
- Store in S3
- Query with
Athena
- Build custom
dashboards in QuickSight
2,
Cost Anomaly Detection
- Detect abnormal hourly EC2 spikes
- Email / SNS
alerts
3,
Automation
- Trigger Lambda when hourly EC2 cost exceeds threshold
- Auto-scale down non-prod.
No comments:
Post a Comment