title: return txt file from lambda function to be displayed in browser
body: <p>This is what I am using in a lambda function to return the contents of a text file in a variable when a query is sent via API gateway</p>
  
  <p>From Lambda</p>
  
  <pre><code>with open(file_path, 'r') as content_file:
          content = content_file.read()
  
      return content
  </code></pre>
  
  <p>but the problem is when I am opening the api gateway url and the results are returned , the variable content is stripping new lines and carriage return and all other formatting.</p>
  
  <p>Is it possible to just return the file.txt and when api gateway returns the result it just opens the file content on the browser?</p>
  
  <p>something like when I open the url with query </p>
  
  <pre><code>https://foobaar.execute-api.us-east-1.amazonaws.com/Beta/filename?ticket_id_api=b663fa83-874c-4a39-a1e0-741da5c6eec2
  </code></pre>