How to set up Automation to work across multiple accounts

If you haven't deployed the Hyperglance automation stack, do that first.

To grant the automations Lambda access to resources in other AWS accounts you will need to create a special cross-account role in each of those accounts:

  • Edit aws-rule-automations/deployment/terraform/xaccount_role/main.tf

    • Set the lambda_arn to the arn of the lambda function which was given as an output in the main account configuration
  • Connect to an AWS Account where you wish to deploy the Role:

Deploy the Role:

$ cd aws-rule-automations/deployment/terraform/xaccount_role
$ terraform init
$ terraform apply