def create_event_source_mapping(EventSourceArn, FunctionName, StartingPosition, Enabled=True, BatchSize=100, region=None, key=None, keyid=None, profile=None):
 try:
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  obj = conn.create_event_source_mapping(EventSourceArn=EventSourceArn, FunctionName=FunctionName, Enabled=Enabled, BatchSize=BatchSize, StartingPosition=StartingPosition)
  if obj:
   log.info('The newly created event source mapping ID is {0}'.format(obj['UUID']))
   return {'created': True, 'id': obj['UUID']}
  else:
   log.warning('Event source mapping was not created')
   return {'created': False}
 except ClientError as e:
  return {'created': False, 'error': salt.utils.boto3.get_error(e)}

def create_event_source_mapping ( EventSourceArn , FunctionName , StartingPosition , Enabled = True , BatchSize = 100 , region = None , key = None , keyid = None , profile = None ) : try : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) obj = conn . create_event_source_mapping ( EventSourceArn = EventSourceArn , FunctionName = FunctionName , Enabled = Enabled , BatchSize = BatchSize , StartingPosition = StartingPosition ) if obj : log . info ( 'The newly created event source mapping ID is {0}' . format ( obj [ 'UUID' ] ) ) return { 'created' : True , 'id' : obj [ 'UUID' ] } else : log . warning ( 'Event source mapping was not created' ) return { 'created' : False } except ClientError as e : return { 'created' : False , 'error' : salt . utils . boto3 . get_error ( e ) }
identifies a stream as an event source for a lambda function .