Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Apr 27, 2023
1 parent f8b6bbe commit 8bb2e7f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions code/ddns-lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
LOGGER = logging.getLogger()
account_id = None
region = None
VERSION = '1.2.0b75'
VERSION = '1.2.0b76'

# Read Env variables
DEBUG_LOG_LEVEL = os.environ.get('DebugLogLevel', 'INFO')
Expand Down Expand Up @@ -720,7 +720,7 @@ def lambda_handler(
cf_zonename = f_zonename
else:
LOGGER.info(
f"4.3 instance: {instance_id}, CNAME no valid hostname or zone found, skipping CNAME")
f"4.3 instance: {instance_id}, CNAME no valid hostname {tag_data['option_cname'].hostname} or zone {f_zonename} found, skipping CNAME")
cf_hostname = None
cf_zonename = None
if cf_hostname and cf_zonename:
Expand Down Expand Up @@ -3265,7 +3265,8 @@ def evaluate_event_action(event):

e_source = event['source']
action = None
try:
# try:
if True:
if e_source == 'aws.ec2':
e_instance_id = event['detail']['instance-id']
e_state = event['detail']['state']
Expand All @@ -3274,8 +3275,8 @@ def evaluate_event_action(event):
f"event_action ** {action} ** instance_id {instance_id} instance_state {e_state}")
else:
LOGGER.info(f"event_action unrecognized source {e_source}")
except:
LOGGER.error(f"event_action event structure cannot be parsed {lineno()}")
# except:
# LOGGER.error(f"event_action event structure cannot be parsed {lineno()}")
return action


Expand Down

0 comments on commit 8bb2e7f

Please sign in to comment.