def _run_aws(cmd, region, opts, user, **kwargs):
 receipthandle = kwargs.pop('receipthandle', None)
 if receipthandle:
  kwargs['receipt-handle'] = receipthandle
 num = kwargs.pop('num', None)
 if num:
  kwargs['max-number-of-messages'] = num
 _formatted_args = ['--{0} "{1}"'.format(k, v) for (k, v) in six.iteritems(kwargs)]
 cmd = 'aws sqs {cmd} {args} {region} {out}'.format(cmd=cmd, args=' '.join(_formatted_args), region=_region(region), out=_OUTPUT)
 rtn = __salt__['cmd.run'](cmd, runas=user, python_shell=False)
 return (json.loads(rtn) if rtn else '')

def _run_aws ( cmd , region , opts , user , ** kwargs ) : receipthandle = kwargs . pop ( 'receipthandle' , None ) if receipthandle : kwargs [ 'receipt-handle' ] = receipthandle num = kwargs . pop ( 'num' , None ) if num : kwargs [ 'max-number-of-messages' ] = num _formatted_args = [ '--{0} "{1}"' . format ( k , v ) for ( k , v ) in six . iteritems ( kwargs ) ] cmd = 'aws sqs {cmd} {args} {region} {out}' . format ( cmd = cmd , args = ' ' . join ( _formatted_args ) , region = _region ( region ) , out = _OUTPUT ) rtn = __salt__ [ 'cmd.run' ] ( cmd , runas = user , python_shell = False ) return ( json . loads ( rtn ) if rtn else '' )
runs the given command against aws .