Hey Hillary,
Thank you for responding
I actually gave up on this soon after i posted and opted to just deploy my own aws lambda and call that instead which is working, but since you responded I just tried putting the netlify function back in to try again and… it works! I have no idea why it didn’t before
Embarrassingly most likely reason it wasn’t working before is probably because I didn’t copy and paste my database environment variables correctly into the netlify settings, as after i gave up on this a week ago I deleted them, so I probably just copied them in correctly this time. I logged out the environment variables last time and i thought they were all correct, but i guess its very easy to miss that a long string of random characters and symbols is missing one or two characters