title: Get non-ASCII filename from S3 notification event in Lambda
body: <p>The <code>key</code> field in an AWS S3 notification event, which denotes the filename, is URL escaped. </p>
  
  <p>This is evident when the filename contains spaces or non-ASCII characters.</p>
  
  <p>For example, I have upload the following filename to S3:</p>
  
  <pre><code>my file řěąλλυ.txt
  </code></pre>
  
  <p>The notification is received as:</p>
  
  <pre><code>{ 
    "Records": [
      "s3": {
          "object": {
              "key": u"my+file+%C5%99%C4%9B%C4%85%CE%BB%CE%BB%CF%85.txt"
          }
      }
    ]
  }
  </code></pre>
  
  <p>I've tried to decode using:</p>
  
  <pre><code>key = urllib.unquote_plus(event['Records'][0]['s3']['object']['key']).decode('utf-8')
  </code></pre>
  
  <p>but that yields:</p>
  
  <pre><code>my file ÅÄÄÎ»Î»Ï.txt
  </code></pre>
  
  <p>Of course, when I then try to get the file from S3 using Boto, I get a 404 error.</p>