Haaska shipped in a docker image with Tailscale
It allows to use Alexa Smart Home Skill without exposing your Home Assistant instance to the internet (except during setup )
If you fork this repo and setup AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as Github encrypted secrets, a Github workflow will build and publish a docker image to your AWS ECR own account on eu-west-1 that you then can use for your "HomeAssistant-SmartHome" Lambda function
Currently it uses a fork of haaska in order to use environnment variables instead of the config.json for the home assistant url and token
Requirement: The HA Tailscale Add-on installed and configured
- Go to Settings -> Secrets and variables -> Actions and setup AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as Github encrypted secrets.
- Select Actions.
- Select "ci" on the left.
- Click "Run workflow".
- After successful run, the "ha-lambda-tailscale" repository should appear in the AWS ECR including the published image "latest.
https://github.com/mike-grant/haaska/wiki/Setting-up-haaska
- Login to AWS and click on the Services button at the top left. Look for the "Compute" section, and click on "Lambda".
- Click "Create function" in the upper right.
- Select the "Container image" tile.
- Enter a function name, e.g. haaska.
- Click "Browse images"
- Select the AWS ECR repository "ha-lambda-tailscale"
- Under "Images" select the image with tag "latest". This image was published previously by the github workflow for you.
- Click "Change default execution role" and select "Use existing role".
- Select the former created "lambda_basic_execution" role.
- Click "Create function" in the bottom right.
- The "Function designer" window should open.
-
In the Function designer view click "Add trigger".
-
Select "Alexa" as source.
-
Select the "Alexa Smart Home" tile.
-
Paste the "Skill ID" from the Alexa Developer Console window (e.g. amzn1.ask.skill.xxxxxxx).
-
Click Add in the bottom right.
-
The "Alexa" trigger should now show up and the "Configuration" tab should be selected.
-
Click "Environment variables" on the left.
-
Click on "Edit and then on "Add environment variable" three times to add the following variables that the lambda function needs:
ENV Type Description HA_TOKEN string The long living HA token HA_URL string Important the TAILSCALE ip from HA e.g http://{tailscale-ha-ip}:8123. Should be start with 100.xxx.xxx.xxx TAILSCALE_AUTHKEY string The ephemeral key set up in tailscale web ui. Should be start with tskey-auth-xxxxx (see https://tailscale.com/kb/1113/aws-lambda/) HINT: How to create the TAILSCALE_AUTHKEY: Go to tailscale web ui -> Settings -> Keys - Click "Generate auth key..."

I advise to limit the concurrency of the Lambda function (e.g. "5") in order not to reach the Tailscale machine limit depending on your plan
https://github.com/mike-grant/haaska/wiki/Setting-up-haaska#linking-aws-lambda-to-alexa-skills-kit
