title: Module Import Error when executing a Lambda python function
body: <p>I am trying to execute a python function on AWS Lambda. In my function I am trying to import the mysql.connector module. But an error is throwing up :</p>
  
  <blockquote>
    <p>errorMessage": "No module named 'mysql.connector'"</p>
  </blockquote>
  
  <p>I had written my python code initially in my EC2 Instance. I installed mysql-connector there in my python file directory using pip.</p>
  
  <pre><code>pip install mysql-connector -t /path/to/file/dir
  </code></pre>
  
  <p>I uploaded the zip file of the only the file and not any folder containing the file.</p>