import asyncio
async def listener():
while True:
message = await sqs.poll()
if message:
asyncio.ensure_future(handle(message))
async def handler(message):
await ...
loop = asyncio.get_event_loop()
asyncio.ensure_future(listener)
loop.run_forever()