0

This is not my area so its probably basic. We have some instance in Amazon EC2, on development. The only thing it do, is to run some php script . We pay a lot, although we only use it once in a while to check things .

I would like to stop it ,and resume when ever i need it for an hour of tests. I could see you can put it in stop mode , and they say it will erase all the data.

They also say it will remove any previous DNS and create new when resume

That means they dont really gives you any option for development, because you cant change the whole system every time, with a different DNS, and recopy your data.

Is that means we have to copy our script to the server every time we want to resume and update to a new DNS?Is there any other things affected by the stop ?
Is there any simpler way to stop charging and resuming every once in a while ? thanks.

4
  • Who is "they" in "they say..."? Jan 3, 2016 at 9:28
  • If it is an internal script which you want to run, why do you care if there is a change in DNS name or IP address of the server? Can you elaborate? Jan 3, 2016 at 16:20
  • docs.aws.amazon.com/AWSEC2/latest/UserGuide/… check out the warning.
    – Curnelious
    Jan 4, 2016 at 7:45
  • I care because the address is pre programmed in hardware device, so you cant change it latter , and so it has to be constant forever .
    – Curnelious
    Jan 4, 2016 at 7:51

2 Answers 2

6

According to your question, Yes you can stop the instance and the data will still remain if the instance is EBS-backed. An Amazon EBS-backed instance can be stopped and later restarted without affecting data stored in the attached volumes. According to my knowledge, By Default Amazon provides EBS-backed root volume so no worries for the data.

You can use Elastic IP Address instead of DNS names. An Elastic IP address is a static IP address designed for dynamic cloud computing.Your Elastic IP address is associated with your AWS account, not a particular instance, and it remains associated with your account until you choose to release it explicitly.

So if you use Elastic IP Address instead of DNS names in your php script your problem will be solved.

Hope it helps:-)

Reference: AWS Elastic IP Address

AWS Root Device Storage Concepts

4
  • This answer is mostly correct, but misses an important point. Elastic IPs are, as stated, allocated to your account until released, but also, they remain assocated with the specific instance you associate them with until that association is removed by you, if you are using VPC instances (and you should be), even if the instance is stopped. A charge of $0.005/hour is applied to EIPs that are not currently used as the primary EIP of a running instance (e.g. attached to a stopped instance, attached to no instance, or used as a secondary EIP on an instance which already has a primary EIP). Jan 3, 2016 at 12:51
  • well , i am not sure its true because it is EBS, and they say data will be erased, check out the WARNING here : docs.aws.amazon.com/AWSEC2/latest/UserGuide/…
    – Curnelious
    Jan 4, 2016 at 7:45
  • and thanks for the advice, because i am not from the area, what does it means to use elasticIP ? not connecting my instance with a website DNS name? how you do that and why is it solving the problem ? (the price problem?)
    – Curnelious
    Jan 4, 2016 at 7:49
  • 2
    @Curnelious Well the warning says that data on instance store will be lost i.e. temporary storage. EBS volumes will persist data even if you stop instance or umount volume.
    – niteshd22
    Jan 4, 2016 at 11:16
2

No data is erased when you stop an instance, only when you terminate it (if you choose to).

You can have an elastic IP and pay when you don't use it (as Michael said) or maybe install a DNS updater like ddclient

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.