Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alexa-homeassistant

Amazon Alexa Smart Home → Home Assistant through nginx, with optional mTLS between AWS Lambda and your reverse proxy. CloudFormation deploy. No Envoy, no Nabu Casa subscription, no long-lived HA token in production.

Alexa skill → Lambda → https://ha.example.com/api/alexa/smart_home (mTLS) → nginx → HA
Alexa app   → https://ha.example.com/auth/authorize + /auth/token (no client cert)

Repo layout

Path What
lambda/ Python proxy (lambda_function.py), dependencies
cfn/template.yaml CloudFormation: Lambda, IAM, Alexa invoke permission
nginx/homeassistant.conf mTLS + OAuth path exceptions
unraid/step-ca.xml unRAID Community Applications template for smallstep/step-ca
docs/ Alexa setup, step-ca, nginx
.github/workflows/ Build zip → S3 → cloudformation deploy (manual dispatch)

Quick start

  1. Home Assistant: enable alexa.smart_home; set external URL to https://ha.example.com.
  2. Alexa Developer Console: create Smart Home skill (payload v3); note Skill ID.
  3. mTLS (recommended): run step-ca (see docs/step-ca.md), issue a client cert, store it in an SSM SecureString parameter.
  4. Deploy: see docs/alexa-setup.md for the aws cloudformation deploy command, or run the deploy GitHub Action (set AWS_ROLE_ARN, ARTIFACT_BUCKET, AWS_REGION).
  5. Link account in the Alexa app.

Region: North America → us-east-1.

Cost

This stack is designed to run at ~$0/month: arm64 Lambda at 128MB, free SSM standard-tier SecureString parameters instead of Secrets Manager, and a configurable CloudWatch log retention (default 90 days).

Why mTLS?

Without it, anyone on the Internet who can reach ha.example.com can attempt Home Assistant logins. With mTLS, nginx refuses connections that do not present a client certificate from your private CA — while Amazon’s OAuth callbacks (/auth/*) stay reachable so account linking still works.

Credits

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages