Skip to content

Commit

Permalink
Fix for event payload parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
rjulian committed Sep 21, 2020
1 parent 45b32a8 commit 17ae48d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions source/reflex_aws_config_rule_deleted.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def get_remediation_message(self):
def lambda_handler(event, _):
""" Handles the incoming event """
print(event)
if subscription_confirmation.is_subscription_confirmation(event):
subscription_confirmation.confirm_subscription(event)
event_payload = json.loads(event["Records"][0]["body"])
if subscription_confirmation.is_subscription_confirmation(event_payload):
subscription_confirmation.confirm_subscription(event_payload)
return
rule = ConfigRuleDeleted(json.loads(event["Records"][0]["body"]))
rule = ConfigRuleDeleted(event_payload)
rule.run_compliance_rule()

0 comments on commit 17ae48d

Please sign in to comment.