22

If I do this 10 times a month, how much would that cost me?

3 Answers 3

38

Very close to nothing.

There is no cost to make an AMI itself, but if you're making it from a running instance you will pay the fees for running a micro instance (which is about $0.02/hr, depending on availability region - see the pricing details) and also fees for using the EBS root for however long you use it.

When storing the AMI, you only pay for the S3 storage taken from the snapshot. The root FS must be an EBS volume (for all micro instances), but this is stored as an EBS snapshot (which are stored in S3, rather than EBS) so you pay S3 fees to store it. Note that EBS charges per allocated GB, while S3 charges per used GB; with the way they do things, a 10G EBS volume that only has 500MB on it will only take up approx. 500MB of S3 storage.

Further to that, Micro instances are included in Amazon's free tier at the moment, so all of the above will cost you nothing (with limits - see the pricing link above).

3
  • 4
    I think you meant: Note that EBS charges per allocated GB, while S3 charges per used GB Nov 7, 2012 at 18:24
  • "The root FS must be an EBS volume (for all micro instances), but this is stored as an EBS snapshot (which are stored in S3, rather than EBS) so you pay S3 fees to store it." - Is this up to date? I suspect not, because right now the EBS pricing page says that it's $0.053/GB-month for EBS Snapshots Storage (Standard, not Archived), while the S3 pricing page says $0.024 per GB-month (or cheaper). aws.amazon.com/ebs/pricing & aws.amazon.com/s3/pricing Sep 15, 2022 at 22:29
  • Is it up to date? No, the question was answered more than a decade ago, it's very likely that things have changed in the interim.
    – El Yobo
    Oct 2, 2022 at 12:35
1

Ami image is 0.05$/GB not 0.02$/GB, is the ebs snapshot price. An ami image or a snapshot is reducing the storage price in half from gp2 to snapshot. If it's gp3 or magnetic not so much.

See the today prices here : https://aws.amazon.com/ebs/pricing/

1
  • 1
    It's per GB, not per MB. Mar 3, 2023 at 22:21
0

It depends on the size of the AMI, which would be based on the EBS usage size. So if you provisioned 50 GB of SSD (gp2) for your EC2 t.micro server, in the USA east coast (pricing of this region in 2022 is used throughout this answer), it would be $0.10 per GB per month, so $5.00 (ignoring any free tier discounts). Let's say you are using up 10% of that HD, about 5GB, which is a realistic number for OS and other packages and libraries.

When you create an AMI, AWS will automatically create a snapshot in the background. This snapshot is viewable under EBS snapshots and will not be deletable as long as that AMI is in existence. You will get an error if you try to delete this snapshot. Snapshots cost less than provisioned EBS at $0.05 per GB per month, and since snapshots ignore empty blocks, it will be shrunk to used size, so about 5GB in this case. Cost wise, it would be $0.25 per month for that single AMI. If you have 10 of these, it would be about $2.25 roughly (as long as you keep it maxed at 10 AMIs and not increase it each month).

If you want to lower costs, you can save the AMIs into S3, instead of EBS snapshots. This is somewhat advanced and as far as I know, it can only be done via AWS CLI, and not in the GUI console. You use a command called aws ec2 create-store-image-task and you have to specify the destination bucket name and make sure permissions for EC2, S3 and EBS all allow it. You can get more detailed answer at the official AWS Documentation. S3 has lower cost structure at $0.023 per GB per month, so this would reduce each AMI to $0.12 per month, or $1.15 for 10 images.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .