Within my lambda function, which takes in event api query strings, I want to check if one is present. The below works if it is:
if event['queryStringParameters']['order'] == 'desc':
file_names.append('hello')
I have tried event['queryStringParameters']['order'] != null but if there is no order query string used the lambda function the function breaks causing a 502 response. How do I check if a query string is not used without it breaking?