aws-health-aware
aws-health-aware copied to clipboard
Multi-Region deployment fails to create all lambda environment variables
When deploying AHA in multi-region mode, I am getting the error:
[ERROR] KeyError: 'ACCOUNT_IDS'
Traceback (most recent call last):
File "/var/task/handler.py", line 872, in main
describe_org_events(health_client)
File "/var/task/handler.py", line 734, in describe_org_events
if os.environ['ACCOUNT_IDS'] == "None" or os.environ['ACCOUNT_IDS'] == "":
File "/var/lang/lib/python3.8/os.py", line 675, in __getitem__
raise KeyError(key) from None
Looking at cloudformation, it appears the line starting below doesn't create ACCOUNT_IDS as an environment variable for the secondary region - https://github.com/aws-samples/aws-health-aware/blob/06229f14e41c0ab5b71f66f68f1b33db48aa7d05/CFN_DEPLOY_AHA.yml#L408
Taking a look at this.