title: AWS python lambda function:No module named requests
body: <p>I am fairly new to AWS and I am having some issues. Here is my code:</p>
  
  <pre><code>from __future__ import print_function
  from urllib2 import Request, urlopen, URLError
  import requests
  import boto3
  import json
  
  def lambda_handler(event, context):
      url = "https://globalcurrencies.xignite.com/xGlobalCurrencies.json/GetHistoricalRatesRange?Symbol=BTCUSD&amp;PriceType=Mid&amp;StartDate=01/01/2017&amp;EndDate=10/27/2017&amp;PeriodType=Daily&amp;FixingTime=22:00&amp;_token=some_token_xyz"
      response = requests.get(url).json()
      # print json.dumps(response, indent=4) # gives a syntax error
      return response
  </code></pre>
  
  <p>Name of the file is lambda_function.py; I have checked similar problems on stackoverflow and some mentioned that I have to change the file naming. But it didn't help. Here is how python method was named:<br>
  <a href="https://i.stack.imgur.com/eFIGR.png" rel="noreferrer"><img src="https://i.stack.imgur.com/eFIGR.png" alt="enter image description here"></a>
                                                                               Here is the error I am getting: 
  <code>START RequestId: cf24e9be-bbef-11e7-97b4-d9b586307f3e Version: $LATEST
  Unable to import module 'lambda_function': No module named requests</code>
  And when try to print it gives me a syntax error. Sorry for the formatting. Any suggestions?</p>