in global-clusters-automation/failover_and_convert_lambda_function.py [0:0]
def validate_input(event):
try:
if not event['secondary_cluster_arn']:
print('Secondary cluster ARN', event['secondary_cluster_arn'],
'is invalid. Please provide a valid secondary cluster ARN ')
raise RuntimeError
if not event['global_cluster_id']:
print('Global Cluster Identifier ', event['global_cluster_id'], 'is invalid. Please provide a valid global '
'cluster id')
raise RuntimeError
if not event['hosted_zone_id']:
print('Hosted zone id ', event['hosted_zone_id'], 'is invalid. Please provide a valid hosted zone id')
raise RuntimeError
if not event['primary_cluster_cname']:
print('Primary Cluster CNAME ', event['primary_cluster_cname'], 'is invalid. Please provide a valid CNAME '
'to manage endpoint')
raise RuntimeError
except KeyError as e:
print('ERROR OCCURRED WHILE PROCESSING: ', e)
print('PROCESSING WILL STOP')
raise KeyError