Tutorial to register a AWS EC2 instance with Hakuna Cloud

Register an AWS EC2 instance as VHost

This tutorial will help you to register an AWS EC2 instance as Hakuna Cloud VHost. Once it is registered, a process that may take 5 minutes, you will start saving money, paying only when you need the instance.

You can create your own instance, or choose one of our examples.

Create a new provider

A provider is the secure container for the AWS Access Key to call the cloud vendor APIs on behalf of the user. More details about the provider configuration can be found here.

Execute hakuna create provider to create a new provider. Select awsec2 as the type, and pick a name to identify this provider in the future.

Then the hakuna CLI will ask for credentials. AWS Credentials can be generated from the AWS Console in the IAM section.

Create a new VHost

A VHost must belong to a provider and is identified by an FQDN, which is a domain name like docs.hakuna.cloud. In this tutorial we will configure the Proxy Trigger, so the FQDN is the most important attribute since it is used by Hakuna Cloud to route the HTTP/S traffic to your instance.

Execute hakuna create vhost to create a VHost. The CLI will guide you through the creation of this resource.

Update DNS

Last step is to let eu1-42.lb.hakuna.cloud handle the traffic. Add a CNAME record that point to eu1.lb.hakuna.cloud. For example:

wordpress.porketta.io. CNAME eu1.lb.hakuna.cloud

That’s it. As soon as the DNS change is propagated (chek it in real time!), Hakuna Cloud will manage the instance stopping it when there is no thraffic and waking it up when it is needed!