AWS Builder Center
The Price of Off: Costing a Stopped AWS Workload

The Price of Off: Costing a Stopped AWS Workload

A stopped EC2 instance is the cheapest part of an “off” workload. We price four states, from $2.40 to $62.63 a month, and check what the new spend limits do and don’t say about them.

Data science & analytics

The Price of Off: Costing a Stopped AWS Workload

Cost estimates in this article are worked examples with stated assumptions, not measured billing data.

The question the “Stop” button doesn’t answer

A workshop ends. You open the EC2 console, select the instance and click Stop instance. The state changes to stopped, and it feels like the meter should stop with it.
Then the next invoice arrives, and the number is not zero. Nobody can say which line item is the culprit, because “off” was never one thing.
This is a familiar trap, and the basic warning has been written before. Builder Center already has a good checklist in 7 AWS Services That Still Cost You Money, and two recent articles touch on the same problem from the side: one on pausing a chat server between events, one on the new spend limits. This article asks a different question: how much does each version of “off” cost?

Why “off” is not a state

Think of a parked car. Switching off the engine stops the fuel, but the parking meter keeps running. Some of your cloud resources are the engine. Others are the parking space.
AWS documents this split. A stopped EC2 instance no longer accrues instance usage charges, but the EBS volumes attached to it keep billing for as long as they exist [1]. An auto-assigned public IPv4 address is released when the instance stops, while an Elastic IP stays allocated to your account [2]. And since February 1, 2024, every public IPv4 address costs $0.005 per hour, whether it is attached to something or sitting idle [3].
The word “stopped” describes one resource, the instance. Your workload is more than that.

The ladder of “off”

We priced four states of the same workload, from the leanest to the most forgotten. The assumptions are deliberately simple: one month of 730 hours, a 30 GB gp3 volume, the instance stopped the whole time, and us-east-1 list prices.
State
What is still there
Monthly cost
A: Stopped, auto-assigned IP
30 GB gp3 volume
$2.40
B: A + Elastic IP kept
+ one public IPv4
$6.05
C: A + NAT Gateway left running
+ NAT Gateway + its public IPv4
$38.90
D: C + Application Load Balancer
+ ALB + 2 public IPv4
$62.63

How the numbers are built:
  • EBS: 30 GB × $0.08 per GB-month = $2.40 [6]. The gp3 baseline of 3,000 IOPS and 125 MB/s is included at no extra charge [6].
  • Public IPv4: $0.005 × 730 hours = $3.65 [3].
  • NAT Gateway: $0.045 per hour × 730 = $32.85, plus its own public IPv4 at $3.65, so $36.50. It bills while it is provisioned and available, whether or not any traffic passes through it. Data processing is charged on top at $0.045 per GB [4].
  • ALB: $0.0225 per hour × 730 = $16.43, plus two public IPv4 addresses (one per Availability Zone) at $7.30, so $23.73. Load Capacity Unit charges are usage-based and excluded here [5].
The instance, the thing you actually clicked “Stop” on, contributes nothing. In state D, the stopped instance is the cheapest item on the invoice.

A real-world use case

Consider a one-day community workshop. A single EC2 instance runs a chat application behind Amazon CloudFront, and a NAT Gateway gives the instance outbound access while it is being set up. The event lasts six hours. This is close to the setup of a recent Builder Center article on keeping a CloudFront maintenance page up while the origin is stopped, whose author sensibly placed the NAT Gateway in a separate CloudFormation stack so it could be deleted on its own.
Here is what each decision costs, using assumed prices of about $0.05 per hour for a t8i.medium and about $0.042 per hour for a t3.medium:
Decision
Cost
Running a t8i.medium for the 6-hour event
≈ $0.30
Choosing t8i over t3 instead (≈ 20% pricier per hour)
≈ $0.05 more
Leaving the NAT Gateway running for 7 days after the event
≈ $8.40 (168 h × $0.045, plus its public IPv4)
CloudFront at this scale
≈ $0: the always-free tier covers 1 TB and 10M requests a month [9]
The newer instance family is the choice people debate. It is a rounding error. The AWS announcement says T8i offers up to 30% better price-performance than T3 [10], and that is a claim about work done per dollar, not a lower hourly price. For a six-hour event, the hourly difference is about five cents. A NAT Gateway forgotten for a week costs roughly 28 times the entire six-hour instance bill.

The decision: sort resources by what keeps them billing

The most useful change is not a tool. It is a way of classifying resources before you build:
  • Compute bills only while running. EC2 instances belong here.
  • Attached resources outlive the compute they serve. EBS volumes, snapshots and Elastic IPs belong here. Stopping the instance does not touch them.
  • Standing resources bill simply because they exist. NAT Gateways and load balancers belong here. Their meter has nothing to do with whether anyone is using them.
Managed databases deserve a special note. Amazon RDS lets you stop an instance, but storage and backups continue to bill, and AWS automatically starts a stopped instance again after seven days [7]. “Stopped” here has a timer on it.
Once you have the three classes, the rule follows. Standing resources should have the lifecycle of the project, not of the instance. Put them in their own stack, give them an explicit teardown date, and treat “stop the instance” and “tear down the environment” as two separate actions.

The solution: a read-only audit you can run today

Nothing here deletes anything. Run these in a development account, per Region, and compare the output with the ladder above.
# Stopped instances (the part you already know about)
aws ec2 describe-instances \
--filters "Name=instance-state-name,Values=stopped" \
--query "Reservations[].Instances[].[InstanceId,InstanceType]" \
--output table

# Elastic IPs: an empty AssociationId means it is allocated but attached to nothing
aws ec2 describe-addresses \
--query "Addresses[].[PublicIp,AllocationId,AssociationId]" \
--output table

# NAT Gateways that are provisioned and billing
aws ec2 describe-nat-gateways \
--filter "Name=state,Values=available" \
--query "NatGateways[].[NatGatewayId,VpcId,SubnetId]" \
--output table

# Load balancers
aws elbv2 describe-load-balancers \
--query "LoadBalancers[].[LoadBalancerName,Type,State.Code]" \
--output table

# EBS volumes attached to nothing
aws ec2 describe-volumes \
--filters "Name=status,Values=available" \
--query "Volumes[].[VolumeId,Size,VolumeType]" \
--output table

# Databases, including stopped ones
aws rds describe-db-instances \
--query "DBInstances[].[DBInstanceIdentifier,DBInstanceStatus,AllocatedStorage]" \
--output table
Each command inspects only your configured Region, so repeat it for every Region you have used. Then price what you find.

What about the new spend limits?

AWS is rolling out project-level spend limits, and they are a real safety net for learners. The documentation is specific about the conditions [8]:
  • You must be on a Paid Plan, and the experience is being released to a limited number of customers, so you may not see it yet.
  • The minimum limit is the greater of $20 or a conservative estimate of your likely spend. Limits apply to pre-tax charges and exclude credits.
  • When the limit is reached, AWS pauses the project and stops all resources. Your data is preserved. After you raise the limit, some resources may need to be restarted by hand. If you take no action within 90 days, project data is permanently deleted.
There are also optional early controls: about 7 days before the limit, new resources stop launching; about 5 days before, idle resources are paused; about 4 days before, the highest-cost active resources are paused [8]. The idle check looks back 14 days. For EC2 it means peak CPU under 5% and network I/O under 5 MB per day, and for RDS it means no database connections, low CPU and low read/write activity [8].
Reading the page closely raises two questions it does not answer:
  1. Which charges continue while a project is paused? The page says data is preserved, but it does not say whether stored data, such as EBS volumes, snapshots or database storage, keeps billing.
  1. Do the early controls cover standing resources? The services named for idle and top-cost pausing are EC2, RDS, SageMaker endpoints, Lambda and Bedrock. NAT Gateways and load balancers are not named.
I have not tested either question, and the answers matter. A spend limit is a ceiling on your learning experiments, not a substitute for knowing what your “off” workload costs.

The question for you

An environment is never as temporary as the person who built it. So here is the question I’d ask any team: who owns the teardown date of your “temporary” environment, and where is it written?
And if you audit your own account with the commands above, which “off” resource surprised you the most?

Sources

[1] Amazon EC2 User Guide, Amazon EC2 instance state changes:  https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html  [2] Amazon EC2 User Guide, Amazon EC2 instance IP addressing:  https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html  [3] AWS News Blog, New: AWS Public IPv4 Address Charge + Public IP Insights:  https://aws.amazon.com/blogs/aws/new-aws-public-ipv4-address-charge-public-ip-insights/  [4] Amazon VPC pricing (NAT Gateway, public IPv4):  https://aws.amazon.com/vpc/pricing/  [5] Elastic Load Balancing pricing:  https://aws.amazon.com/elasticloadbalancing/pricing/  [6] Amazon EBS pricing:  https://aws.amazon.com/ebs/pricing/  [7] Amazon RDS User Guide, Stopping an Amazon RDS DB instance temporarily:  https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StopInstance.html  [8] AWS Account Management Reference Guide, Create a spend limit:  https://docs.aws.amazon.com/accounts/latest/reference/create-spend-limit.html  [9] Amazon CloudFront pay-as-you-go pricing:  https://aws.amazon.com/cloudfront/pay-as-you-go/  [10] AWS News Blog, New low-cost burstable Amazon EC2 T8i instances are generally available:  https://aws.amazon.com/blogs/aws/new-low-cost-burstable-amazon-ec2-t8i-instances-are-generally-available/ 
Related Builder Center articles: 7 AWS Services That Still Cost You Money (Eduardo Lara):  https://builder.aws.com/content/3GbCgjrPwDlfJ2skTodVedYLLSU  · Keep the lights on while EC2 is off (Kohei Otani) · AWS Spend Limits: A Safer Way for Beginners to Learn Cloud! (Rashi Dashore)
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article