I have a list of dictionary accepting the user Input values as shown below:
def get_params(app_name):
return [
{'Key':'Path', 'Value': event['Path']},
{'Key':'TargetType', 'Value': event['Target']},
{'Key': 'Owner', 'Value': event['Owner']}
]
def lambda_handler(event,context):
params = get_params('hello')
print(params)
How to set default values for Path
as /
and TargetType
as True
for example, so that if user has not passed any value, it picks the default value?
Edit: Wanted to have default value set for Path
, in case the value of event['Path']
is not found or is null.