0

I need to fetch some data from MySQL database inside AWS Lambda function. How to achieve this? I already tried pip install mysql-connector-python -t ~/lambda-dir/. It does not work on my Mac.

anik_s
  • 243
  • 3
  • 18
  • Possible duplicate of [Problems using MySQL with AWS Lambda in Python](http://stackoverflow.com/questions/35763380/problems-using-mysql-with-aws-lambda-in-python) – wolendranh May 13 '16 at 11:29

1 Answers1

2

Creating a deployment package for AWS Lambda for Python is a little different procedure on Mac than Linux. First, I had to create setup.cfg file inside the package directory had to write this on setup.cfg file:

[install]
prefix= 

Another thing is that, I had to use

pip install mysql-connector-python-rf -t ~/lambda_folder

instead of

pip install mysql-connector-python -t ~/lambda_folder

anik_s
  • 243
  • 3
  • 18