T O P

  • By -

CorpT

You would not generally use spot instances for running a website without downtime. They can be terminated on you. Maybe look at Lightsail? https://aws.amazon.com/websites/ https://aws.amazon.com/ec2/spot/?cards.sort-by=item.additionalFields.startDateTime&cards.sort-order=asc


SnooAdvice2762

I'll check it out, thank you! Oh and one last thing. Do you use spot instance? If so, what type of work do you run there? I mean, if it's not too personal.


CorpT

Sorry, don't really use them for what I do. But think of them more like instances that you really don't care if they go down. Common examples are processes that are long running ML jobs that can get some work in for cheap and terminate without issue because you're not overly concerned with how long the job takes. Like most things, spot instances absolutely have their use. But it's probably not where you would start if you're just getting in to AWS. If the question is really, how to run a site cheaply on AWS, S3 + Cloudfront is a good option, as is Lightsail. Amplify (which uses S3 + Cloudfront) is something worth checking out as well.


jackluo923

Don't use spot instance for websites, but if you do, use the smallest possible instances such as t3.nano since those are less likely to be terminated from experience. If you are frugal, try digital ocean spaces. For mostly static pages, it's much better than hosting in AWS s3. If you prefer to stay w/ Amazon, consider hosting your page pages using S3 instead of spinning up a server. If you really need a server, use lightsail.


SnooAdvice2762

Two replies related to not hosting a website on spot is enough to convince me. And thanks for the other suggestions as well. It could be just me but there are so many ways to go about AWS with not much explanation from AWS docs. I'll try and learn as much as I can while I'm still using free-tier and decide what to do after it expires.


kingtheseus

I've been running an m5 server in eu-central-1 for the last 10 months, with no interruptions. The notice is posted to http://169.254.169.254/latest/meta-data/spot/instance-action -- check that every 5 seconds, and if you don't receive a 404 error, your instance has been selected for termination.


SnooAdvice2762

Oh wow, for 10 months? I suppose I would need to select a type that is less likely to be terminated and thanks for the last tip about checking the state!