Skip to content

Installation

Jamie Wood edited this page Jul 30, 2022 · 5 revisions

TODO

1. Create a IAM User

It's recommended to create a dedicated IAM User for Homebridge that only has access to start/stop specific EC2 instances.

When creating the user you need to select programmatic access.

Create a IAM User

2. Create a IAM Policy

Example AWS Policy that allows EC2 instances with tag homebridgeControl: true to be stopped or started.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "ec2:StartInstances",
                "ec2:StopInstances"
            ],
            "Resource": "arn:aws:ec2:*:*:instance/*",
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/homebridgeControl": "true"
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": "ec2:DescribeInstances",
            "Resource": "*"
        }
    ]
}

3. Assign the IAM Policy to the IAM User

4. Tag EC2 Instances

5. Configure Homebridge