On a schedule
See yesterday's AWS bill by service
Each morning you get yesterday's spend broken down by service, with costly ones flagged.
- Runs
- On a schedule
- Apps
- AWS
- AI
- Not needed
- Access
- ce:GetCostAndUsage
Send this to your assistant
Create a ClickRuntime automation: every day at 8am, email me yesterday's AWS cost by service, sorted highest first, and flag any service over $5.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small SaaS company runs its product on EC2, RDS, S3 and a handful of Lambda functions, and the AWS bill is the second largest expense after salaries. The invoice arrives once a month, and the Cost Explorer console is only opened when finance complains. A forgotten GPU instance or a runaway NAT gateway can quietly add several hundred dollars a day, and the team learns about it only when the total is already painful.
Every morning, ClickRuntime calls Cost Explorer for yesterday's spend grouped by service, sorts the services from most to least expensive and emails you the list. Any service above the threshold you set is flagged at the top, so you can spot an unusual line before it grows into a bad month.
It is meant for founders, CTOs and DevOps leads who want cost awareness without logging into the billing console.
What you get out of it
Waste is stopped after one day, not thirty
A forgotten instance costs a little on day one and a lot on day thirty. Seeing it in the first email lets you shut it down before it becomes a line item that needs explaining to finance.
Costs are tied to specific services
A single total tells you nothing. A breakdown showing that CloudWatch Logs doubled or data transfer climbed points your engineers to the exact component to investigate, saving hours of guesswork.
Month-end invoices stop being a surprise
When you have read the daily numbers all month, the final invoice matches what you expected. Budget conversations with finance become calm and factual instead of reactive. Finance conversations stay calm and based on numbers you already saw.
Engineering decisions get a price tag
A new feature that adds a managed database shows up in the next morning's spend. Teams learn the real running cost of architectural choices while changing course is still cheap.
Thresholds make the email actionable
Flagging only the services that cross your limit keeps attention on what matters. Instead of scanning twenty lines, you look at the two that need a decision. Your attention goes to the two lines that need a decision.
How it works
What happens, step by step
Every morning at 8, ClickRuntime asks AWS Cost Explorer what you spent yesterday.
It breaks the total down by service and sorts them from most to least expensive.
Any service over the threshold you set is flagged.
The day's total and the per-service list arrive in your inbox.
Before it runs live
- Connect AWS
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other AWS steps into one automation
Under the hood
The code that runs this automation
from datetime import date, timedelta
import boto3
from clickruntime import on_trigger, credentials, notify
REGION = "us-east-1"
def aws(service):
return boto3.client(service, region_name=REGION, aws_access_key_id=credentials.secret("AWS_ACCESS_KEY_ID"),
aws_secret_access_key=credentials.secret("AWS_SECRET_ACCESS_KEY"))
FLAG_OVER = 5.0
@on_trigger
def run(event):
day = date.today() - timedelta(days=1)
result = aws("ce").get_cost_and_usage(
TimePeriod={"Start": str(day), "End": str(date.today())}, Granularity="DAILY",
Metrics=["UnblendedCost"], GroupBy=[{"Type": "DIMENSION", "Key": "SERVICE"}])["ResultsByTime"][0]["Groups"]
costs = sorted(((g["Keys"][0], float(g["Metrics"]["UnblendedCost"]["Amount"])) for g in result), key=lambda x: -x[1])
lines = [f"{'!! ' if c > FLAG_OVER else ''}{name}: ${c:,.2f}" for name, c in costs if c >= 0.01]
notify.email_me(f"AWS cost {day}: ${sum(c for _, c in costs):,.2f}", "\n".join(lines))
return {"total": sum(c for _, c in costs)}FAQ
Common questions
Does Cost Explorer need to be enabled first?
Are the numbers final for yesterday?
Can it report on several AWS accounts?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Catch AWS spend spikes in Slack
Slack warns you when a day's spend jumps well above the recent average.
See how it worksTrack S3 bucket sizes daily
A daily email with each bucket's size and object count, warning you when one passes your limit.
See how it worksStore files sent to a link in S3
Files or file URLs posted to your link are saved in your bucket under the date, and you get a download link.
See how it worksKeep exploring
Set up “See yesterday's AWS bill by service” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.