def validate_params(module, aws):
 function_name = module.params['function_name']
 if (not re.search('^[\\w\\-:]+$', function_name)):
  module.fail_json(msg='Function name {0} is invalid. Names must contain only alphanumeric characters and hyphens.'.format(function_name))
 if (len(function_name) > 64):
  module.fail_json(msg='Function name "{0}" exceeds 64 character limit'.format(function_name))
 if (module.params['function_version'] == 0):
  module.params['function_version'] = '$LATEST'
 else:
  module.params['function_version'] = str(module.params['function_version'])
 return

def validate_params ( module , aws ) : function_name = module . params [ 'function_name' ] if ( not re . search ( '^[\\w\\-:]+$' , function_name ) ) : module . fail_json ( msg = 'Function name {0} is invalid. Names must contain only alphanumeric characters and hyphens.' . format ( function_name ) ) if ( len ( function_name ) > 64 ) : module . fail_json ( msg = 'Function name "{0}" exceeds 64 character limit' . format ( function_name ) ) if ( module . params [ 'function_version' ] == 0 ) : module . params [ 'function_version' ] = '$LATEST' else : module . params [ 'function_version' ] = str ( module . params [ 'function_version' ] ) return
performs basic parameter validation .