anik_s
anik_s

Reputation: 263

How to create AWS Lambda deployment package that uses mysql-connector-python on Mac OS?

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.

Upvotes: 0

Views: 1077

Answers (1)

anik_s
anik_s

Reputation: 263

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

Upvotes: 2

Related Questions