Wow - after spending another three hours and trying to get tutorials to work (without SQLAlchemy), I finally got it figured out. It looks like I didn't have my security group inbound/outbound rules set up correctly - wow.... that was a major pain! I guess that's how it goes when you're learning something new!
Btw, if I'm using SQLAlchemy with Lambda, do I still need to be careful of concurrent DB sessions and use scoped_sessions? I watched something about the fact that with Lambda a container is created and the pool gets left open (or something like that), so I figured it would be worth asking. It's easy enough to use either way to be on the safe side. I think there was also something about using an RDS proxy as well - I'll have to look into that, too. Thanks! Mike On Sunday, July 5, 2020 at 9:32:45 AM UTC-7 Mike Soultanian wrote: > Is anyone successfully using SQLAlchemy in Lambda? I'm having the hardest > time trying to get it to work - first it times out when I try and connect > using mysql+mysqldb, so then I downloaded the package and created a layer > (pip3 install mysqlclient -t folder) and packaged that up and added it as a > layer and now it's generating "name '_mysql' is not defined" - I've also > tried using pymysql without success (I think I was getting a key error 255 > because it doesn't support mysql 8, but that github message was from 2017). > > So, instead of me posting everything I've tried, I figured I'd first see > if anyone has even gotten it to work. If so, I'd love to know how you did > it... otherwise I'm debating just setting up an EC2 instance instead as I > know it works that way... > > Thanks! > Mike > -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/edc95bcc-34dd-4121-ab22-243288049598n%40googlegroups.com.