Quantcast
Channel: SCN : Blog List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 676

Reduce your HANA AWS cost by utilizing Spot Instances

$
0
0

I am sure many of you have been using the HANA Developer Edition on AWS for  openSAP's Software Development on HANA course. As we are into week 6 of the course (trying to spend as much time to practice the examples shared by Thomas Jung), I will try to share a quick tip to save on AWS costs.

 

In Week 1 Thomas pointed out that by using Spot Requests we can bid for unused capacities for Amazon instances. While working on these spot instances I realised that there is a catch. Any work that you do on the spot instance would be lost as you need to TERMINATE the instance. Why? Because, there is no option to STOP a spot instance. Thankfully, there is a way around this to ensure you dont lose your long hours' work.

 

Pre-requisites:

  1. SAP HANA Developer Edition on AWS
  2. An Amazon Machine Image (referred to as base AMI subsequently) taken at a suitable point of time. This must include all your development artifacts that you would like to be available in your spot instance (to be requested in subsequent steps).

 

Steps:

  1. Create a new Spot Request using your base AMI
  2. When you create the request ensure you mark all your EBS volumes as "Delete on Termination" = TRUE. This will ensure that after you are done with using your HANA instance, these volumes don't lie in your AWS account adding to the costs
  3. After you HANA instance is up and running, associate your Elastic IP to the newly created instance. You can then complete your development tasks that you planned for. Please Save & Activate everything to ensure the HANA repository is up to date.
  4. After your tasks are complete and you no longer need the instance, create a new Amazon Machine Image for your "Spot Instance". [Please note that you are not creating an image of your original instance which is probably not running at this point of time.]SpotInstances.jpg
  5. The status of your new AMI will change to "available" after successful completion.
  6. Remove the association between the Elastic IP and the Spot Instance.
  7. Now you can terminate your spot instance.

 

Whenever you want to resume your work for HANA, you can create a new Spot Request using the new AMI created in Step 4 and use it as the Base AMI. As you keep following these steps week after week, please ensure that you remove older AMIs & snapshots to keep your costs down.

 

If you do not want the hassle of creating a different AMI each time, Mani Sekaran Muthu has a good blog on an alternative approach.

 

http://scn.sap.com/community/developer-center/hana/blog/2013/06/23/preventing-the-deletion-of-ebs-volumes-during-the-termination-of-aws-spot-instances


Viewing all articles
Browse latest Browse all 676

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>