title: What is the correct way to write asyncio code for use with AWS Lambda?
body: <p>I wrote the following code:</p>
  
  <pre><code>
  import asyncio
  
  loop = asyncio.get_event_loop()
  
  async def get_urls(event):
  
      return {'msg':'Hello World'}
  
  def lambda_handler(event,context):
  
      return loop.run_until_complete(get_urls(event))
  </code></pre>
  
  <p>I was trying to accomplish the following but faster.</p>
  
  <pre><code>
  def lambda_handler(event, context):
      # TODO implement
      return {'msg':'Hello World'}
  </code></pre>
  
  <p>What was the correct way to write this in an AWS Lambda environment?</p>