I use windows ec2 instances and I need 2-3 tools which I need to install. I ocassionally need 20-40gb hard disk for processing and I always know what HDD size I want before lauching the instance and I always want the tools when I lauch the instance.

Problem is, I need to use it for like 1-2 hours only. Maybe 3 times a month.

What is the best way to tackle this with less price so that I can lauch with the pre installed apps as fast as possible with cost effective way? (processor and ram could be any)

3 Answers 3


Step 1: Create your instance with the installed apps

Step 2: Use it for 1 - 2 hours maybe 3 times per month.

Step 3: Stop the instance when you're done. Don't terminate it or it will go away. Turn on termination protection.

Step 4: Start the instance again when you need it 1 - 2 hours maybe 3 times per month. Repeat step 1 - 3.

As asked that is the most cost effective way to do that. I don't think you need to create an AMI unless for some reason you need to terminate the instance.

  • But my hdd will be chraged right? Won't that be costly? Sometimes I need 10 gb free space when I run, sumtime 40. So if that is scalable for effective price, how will i go about it?
    – LotusORB
    Jul 3, 2020 at 15:58
  • You need to define costly then. Is your time to spin up a new hdd worth more than what Amazon charges to keep your hdd asleep when you dont' need it? Thats not a lot of money. You could keep your hdd as a snapshot. Think thats cheaper by a few dollars per month maybe..
    – JMC
    Jul 3, 2020 at 16:01
  • if my ec2 instance stop, i am not billed. If hdd is stop, i am billed as far as I know. So keep the root drive and get billed and create a new extra volume when ever I need one and delete it after I am finish with my work?
    – LotusORB
    Jul 3, 2020 at 16:04
  • Agreed and I apologize if my definition of costly is different than yours or you're trying to scale this across 1000 instances, but for one instance we're talking about a few dollars per month to keep a hdd that size asleep.
    – JMC
    Jul 3, 2020 at 16:07
  • I am thinking 16Gigs for Root and maybe add the extra 20 gb as new volume when I need it and mount it. But a few dollars a month is still a bit too much for me.
    – LotusORB
    Jul 3, 2020 at 16:12

The ultimate in cost savings (for infrastructure) is going to be to use CloudFormation.

Using CloudFormation, you can have a template file that can:

  1. Launch your EC2 instance,
  2. Install any software you require.

When you're done, delete your CloudFormation stack and your EC2 instance will be deleted as well.

This will work for Windows as long as you have the software available for automated download somehow (like being able to automate MSI downloads, use chocolatey, etc.)

Much time will be required to create your CloudFormation template, but once you have it, there will be $0 in infrastructure costs when it's not in use... just a text file sitting on your desktop.

  • I think this is the best answer given his cost constraints
    – JMC
    Jul 4, 2020 at 11:47

From the beginning: You can launch an instance with the required S.O. Once it's running, connect to the instance and configure your required applications and O.S settings. Then, you can create an AMI from your configured instance, so you can launch future instances with the applications and settings that you have done previously.

Please see: https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/tkv-create-ami-from-instance.html and https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Creating_EBSbacked_WinAMI.html

Because the AMI generates only snapshots from the EBS volumes that you are using in the instance, the costs for keeping that/those snapshot(s) will be according to the size of the snapshot and not the costs for the full capacity of the EBS volume(s)

  • If I create a snapshot/ami with 16gigs of root volume (lets say OS and Apps took 16gigs of space), can I edit the root volume size before restoring/lauching the instance?
    – LotusORB
    Jul 3, 2020 at 17:02
  • Yes, you can edit the size in two moments: 1. When you are creating the AMI (please see the 7th point in the second link in the answer). 2. When you are launching a new instance from your AMI. Please see: [docs.aws.amazon.com/AWSEC2/latest/UserGuide/…
    – asdfgh
    Jul 3, 2020 at 17:10
  • When I create image/snapshots, what is the minimum amout of ssd storage I can give? Lets suppose I use 15gb storage and 15gb free storage. If I create 2gb snapshot with this cofig, will it work? You see, I can't try things out beacuse I dont want a surpise bill from aws. haha
    – LotusORB
    Jul 3, 2020 at 17:28
  • You can't give a size lower than the size of the used snapshot when you launched the instance. In your example the created snapshot will have 30GB. A different thing occur in billing, you will be billed only for the used storage when the snapshot was created. If you only have used 15GB of 30GB, then, the snapshot only billing for those 15GB. When you will use that snapshot the minimum size will be 30GB for the new EBS. See: [docs.aws.amazon.com/AWSEC2/latest/UserGuide/… and [docs.aws.amazon.com/AWSEC2/latest/UserGuide/…
    – asdfgh
    Jul 3, 2020 at 18:02

You must log in to answer this question.

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