def get_lambda_alias(module, aws):
 client = aws.client('lambda')
 api_params = set_api_params(module, ('function_name', 'name'))
 try:
  results = client.get_alias(**api_params)
 except (ClientError, ParamValidationError, MissingParametersError) as e:
  if (e.response['Error']['Code'] == 'ResourceNotFoundException'):
   results = None
  else:
   module.fail_json(msg='Error retrieving function alias: {0}'.format(e))
 return results

def get_lambda_alias ( module , aws ) : client = aws . client ( 'lambda' ) api_params = set_api_params ( module , ( 'function_name' , 'name' ) ) try : results = client . get_alias ( ** api_params ) except ( ClientError , ParamValidationError , MissingParametersError ) as e : if ( e . response [ 'Error' ] [ 'Code' ] == 'ResourceNotFoundException' ) : results = None else : module . fail_json ( msg = 'Error retrieving function alias: {0}' . format ( e ) ) return results
returns the lambda function alias if it exists .