Getting started by installing in AWS

HI Guys,

Absolutely an amateur and have been looking into getting setup with HOME assistant for our new house. Have looked around to see if I could find help in installing HOME ASSISTANT in AWS.

Could someone point me in the right direction as i want to install home assistant in the cloud. also would love to see what should i look out for and where should i start from.

1 Like

Hi @nareshserai I’m happy to help you with this. May I first ask you why do you consider deploying Home Assistant on AWS? Why do you consider it to be a good idea?

Remember that cloud providers have a cost and the price for a solution like this will run between $50~$70 USD per month, depending on the services used. About $40 for a 24/7 VPN connection and $10 for a small sized server. You can add a separated instance for your database and that will cost an additional $20. I created a calculation so you can see the breakdown in details. You can reduce the cost by paying everything upfront or going with smaller instances. You can also reduce the cost by disabling the VPN when you are sleeping, but this would kill automations and data collection.

So my point is: if paying the price of a good sized NUC every year to have your HA on AWS is not a problem for you, I highly encouraged you doing it so as it gives you resources that you simply can’t (or will struggle to) have on a standard deployment. E.g: SMS notifications, (proper) database backups, high availability…

I intend to run it on AWS EC2 instance on a free tier. I have Ubuntu 20.0.4 server installed.

Yes, you can get a t3.micro for free (limited to 12 months) on the free tier, but there’s something you should keep in mind: not all services are available on the free tier, and there’s a crucial service that is required (not 100% required, but highly recommended) and it’s not part of the free tier.

The problem with having HA on an EC2 instance is that you need to have it connect to you home network so it’s able to connect to whatever you have locally, like hubs and IP devices, and scan it for discovery services. And how you allow an external resource to be connected to your network? A VPN.

Sure you can install OpenVPN on the t3.micro instance, but now you have a small instance running a database engine, HA, OpenVPN, and all other add-ons you might consider in the future. The t3.micro might not be a good candidate for all of this. And what’s even worse: the instance has to be exposed to the internet so you can open your VPN tunnel to your home network.

Now, if you use AWS VPC to segment your network, you can have the VPC’s VPN connecting to your home network and your EC2 instance deployed on a private subnet. The VPC’s VPN is not part of the free tier and it will set you back around $40/month.

And just to be clear about something: I’m discouraging you from using AWS. I just want you to be aware of all the costs involved.

And you didn’t give me the “why”. Why do you consider important to have HA on AWS?

Dont really have a solid reason, was trying not to have another piece of hardware installed in the house if i could get away with a free tier setup. More so was trying to get my hands dirty with home assistant and AWS at the same time.

If you suggest not to go AWS route I do have a few spare i5 based PCs sitting around or a raspberry pi3 sitting around as well. Happy to use them as an alternate method. Sorry its my first time. Trying to do this so dont know what I dont know. I really appreciate your help.

I would definitely recommend a local setup using one of your i5 PCs.

1 Like

Thank you @tom_l

I agree with @tom_l: the i5 will give you more flexibility and you won’t depend on a 24/7 VPN connection to flip a light switch. But when your HA installation grows, you should consider AWS for other things. Here’s a couple of examples of how you can integrate AWS with your HA instance:

  1. Backup everything on an Amazon S3 bucket. Because S3 is very cheap and you pay for what you use, it’s a cost-effective backup solution for HA.
  2. Using Node-RED I stream some of the data to AWS IoT Core to leverage some of its real-time analytics capabilities.
  3. Data coming from [2] is used to train a couple of ML models that I’ve built with Amazon SageMaker. The inference model is then pushed to AWS IoT Greengrass and I can run them locally, completely independent from the cloud.
  4. I also AWS IoT Greengrass to run a couple of AWS Lambda functions locally, so instead of heaving containers for small things, I have them running as a Lambda function.

also as i m new ti this whole thing could you point me in the right direction in terms of downlight choices and what else i need to get started with my automations. I’ll start by spinning up my i5 for running the HA instance.

Thanks heaps in advance

Hi Rafa, I would like to ask you your opinion regarding the following scenario: For a HA with no need of a VPN - just used with addons such as Ewelink How to Add Your SONOFF Devices On Home Assistant - SONOFF Official would a EC2 deployment make sense? I won’t see any other significant costs involved from other AWS services

Thank you

Is it possible to run HA on AWS now? I finally managed to fire up an EC2 instance (Debian 12, downgraded AppArmor to v2.13.x), but it is Unsupported and Unhealthy: network_manager and privileged issues.

I’m quite beginner in Linux, is it possible at all to make it Supported and Healthy on AWS?

Eg. network_manager is installed, but there are no physical interfaces.

I really appreciate your insight on cost, however, there has been a case where while I was away the local hardware gone down completely. Power outage, networking issues, etc. What about as a backup install. So you run the AWS EC2 as need?

I’m not aware of any HA (High Availability) solution for Home Assistant. I don’t even know if Home Assistant supports it. But I think it’s a moot point: if your network stack is offline, how will your home automation work? Home Assistant on EC2 won’t help you here.

Thanks for the response. For some reason my HP pc that runs Home assistant OS loses connection to network. The rest of the network infreastructure works fine.