I was mimicking this example repo to try to create a serverless function that imports the mysql python package so I can access my database cluster component of one of my projects.
I have the same structure in my git repo. My
build.sh file is exactly the same. I have changed the
requirements.txt file to only have the string
mysql, corresponding with the package I need to talk with my MYSQL v8 DB. I even added a
.env file that has the same string in the example:
API_KEY="" just as a sanity check, although I’m not sure if this is required. When I go to deploy, all my other functions deploy fine (they do not import any libraries beyond boto3 & botocore for spaces access).
When I deploy my serverless functions I get this error:
[2023-04-12 16:09:48] │ Failures: [2023-04-12 16:09:48] │ › Error: While deploying action 'user/get_profile_data': './build.sh' exited [2023-04-12 16:09:48] │ › with code 126
I have consulted with two PHD experts I have contact with and they both concluded that it is likely a DO specific issue and did not have any readily available solutions to this problem.
Any help in remedying this would be greatly appreciated!
(PS I tried to log in as my own account to post this, however it would not allow me to so I had to post this as a community user. Where can I go to report this issue?)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
If you check the permissions of the
build.shfile does it have executable permissions?
If not, you could executable permissions, you use the following
gitcommand to make the change:
After that push your change as normal to your GitHub repository.
Let me know how it goes!