Skip to content

Clarification Regarding On-Demand EC2 Pricing and Elastic File System

0

Generally in most the projects I do, I primarily use EC2, within such there are multiple instances. Currently, I am using On-Demand Linux Pricing for EC2, it was mentioned in the documentation that EC2 charges by the hour or second (minimum of 60 seconds). My question would be, would the charges be the accumulation of overall time I used, for example I used an accumulation of 1 hour in the 24 hours (10 minutes here, 20 minutes later after an hour of the instance being shut off, etc) or would it would be charged every time I set the state from off to on, so if I on it 24 times, I would pay 24 hours, even if I only used 1 minute for each time I switched it on. Also even if I am no longer charged for the instance once I shut it off, there is still charges, could someone clarify how the Elastic File System works? So basically it would be charging money as long as I don't terminate the instance? Is there any calculator or AWS tools to calculate how much is the charges once the instance is on and off.

1 Answer
0

Regarding your question about On-Demand EC2 pricing, AWS charges you based on the actual time your instances are in the running state, with a minimum of 60 seconds for each start. The charges are accumulated based on the total time used, not the number of times you start the instance. So, in your example of using an accumulation of 1 hour over 24 hours (with intermittent usage), you would be charged for approximately 1 hour of usage, not 24 hours.

However, it's important to note that every time you start an instance, you will be charged for a minimum of 60 seconds, even if you use it for less time. So if you start and stop an instance multiple times within a short period, you might incur slightly higher charges due to this minimum billing increment.

As for the charges you're seeing when the instance is shut off, these are likely related to other AWS services or resources associated with your EC2 instance, such as Elastic Block Store (EBS) volumes or Elastic IP addresses. These resources can continue to incur charges even when your EC2 instance is stopped, unless you specifically release or delete them.

The Elastic File System (EFS) is a separate service from EC2 and is charged based on the amount of storage used and the throughput mode you've selected. EFS charges are independent of your EC2 instance state and will continue as long as you have data stored in the file system, regardless of whether your EC2 instances are running or stopped.

To help calculate and estimate your AWS costs, you can use the AWS Pricing Calculator. This tool allows you to input your expected usage across various AWS services, including EC2 and EFS, and provides an estimate of your monthly bill. Additionally, you can use AWS Cost Explorer to analyze your actual usage and costs over time, which can help you understand how your charges are distributed across different services and resources.

Remember, to fully stop incurring charges for an EC2 instance and its associated resources, you typically need to terminate the instance (not just stop it) and delete any EBS volumes or release any Elastic IP addresses associated with it. For EFS, you would need to delete the file system to stop charges.

Sources
EC2 On-Demand Instance Pricing – Amazon Web Services
Purchasing On-Demand Instances for Amazon EC2 - Amazon Elastic Compute Cloud

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.