F
F
FatherOfDragon2018-10-21 12:41:14
Amazon Web Services
FatherOfDragon, 2018-10-21 12:41:14

How do I keep an AWS instance from going down?

The point is this. There is a free annual instance on AWS, an OpenVpn server is set up on it, and nothing else.
I would like to stay free.
You need to connect to OpenVpn on a case-by-case basis, i.e. no permanent connection.
If you connect Elastic IP, then after a while the instance "turns off", and they start charging money for Elastic IP.
If you disable Elastic IP, then if there is no connection for a long time, the instance is also disconnected, and the next time you access it, the IP address changes, as a result, you need to issue new certificates, which is quite inconvenient.
How to make sure that the instance is not extinguished and is the time of its operation limited when using it for free?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Shumov, 2018-10-21
@inoise

1. Understand the fall of the instance. They don't turn off for no reason
2. Remember that when you restart an instance, it changes ip
3. Connect autoscaling (per instance) + elb and get a dns name so you don't have to search for it by ip

E
Eugene, 2018-10-21
@yellowmew

slightly corrected answer by Ivan Shumov
1.
2.
3. in asg in the userdata, register the connection of EIP to the instance with a script using aws cli - in this case, you will not have to pay for elb
as well. you can do it stupidly - write out a secret key \ access key with your (full) rights
b. you can smoke IAM a bit and allow the instance to perform certain actions with eip using Instance Profile ( IAM Policy , IAM Role are associated with it)
3. Or you can simply register the resulting IP (which will be new every time the instance starts) in route53 if you have zone hosted on AWS

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question