title: Upload code to AWS lambda error Runtime.ImportModuleError
body: <p>I am trying to put this scraping code on AWS Lambda, when i try to test the code i get the following error:</p>
  <pre><code>&quot;errorMessage&quot;: &quot;Unable to import module 'lambda_function': No module named 'lambda_function'&quot;,
    &quot;errorType&quot;: &quot;Runtime.ImportModuleError&quot;
  </code></pre>
  <p>The code:</p>
  <pre><code>from datetime import datetime
  from functions import MultiplePageScraper, CleanTable, upload_unique, pages
  from sqlalchemy import create_engine
  now = datetime.now()
  date = now.date()
  
  # Credentials:
  host = xxxxx
  user = &quot;admin&quot;
  password = xxxxx
  port = 3306
  database = &quot;vehicles&quot;
  # Create connection
  mydb = create_engine(&quot;mysql+pymysql://&quot; + user + ':' + password + '@' + host + ':' + str(port) + '/' + database , echo=False)
  
  # Target Url :
  URL = &quot;https://www.usedcars.co.ke/nairobi/cars-for-sale?page=&quot;
  
  def lambda_handler(event, context):
      # Retrive the data and clean it
      page_count = pages(URL)
      data = MultiplePageScraper(URL, int(page_count))
      clean_data = CleanTable(data)
      # Check for duplicates scraped Vs Database
      upload_data = upload_unique(clean_data, mydb)
      # Upload data to RDS database
      if upload_data.shape[0] &gt; 1:
          upload_data.to_sql(name='CARS', con=mydb, if_exists = 'append', index=False)
          print(f'Uploaded {upload_data.shape[0]} unique rows to the database!')
      else:
          print('No new cars to upload.')
  </code></pre>
  <p>I have no idea what the error means, any one can help?</p>