Skip to content

Commit

Permalink
fix non-org affected_accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
gmridula authored Aug 4, 2021
1 parent 74b0f69 commit 01343ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BETA-multi-region/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ def update_ddb(event_arn, str_update, status_code, event_details, affected_accou
item = response['Item']
if item['lastUpdatedTime'] != str_update and (item['statusCode'] != status_code or
item['latestDescription'] != event_latestDescription or
item['affectedAccountIDs'] != affected_org_accounts):
item['affectedAccountIDs'] != affected_accounts):
print(datetime.now().strftime(srt_ddb_format_full) + ": last Update is different")
# write to dynamodb
response = aha_ddb_table.put_item(
Expand All @@ -498,7 +498,7 @@ def update_ddb(event_arn, str_update, status_code, event_details, affected_accou
'added': sec_now,
'ttl': int(sec_now) + delta_hours_sec + 86400,
'statusCode': status_code,
'affectedAccountIDs': affected_org_accounts,
'affectedAccountIDs': affected_accounts,
'latestDescription': event_latestDescription
# Cleanup: DynamoDB entry deleted 24 hours after last update
}
Expand Down

0 comments on commit 01343ba

Please sign in to comment.