Replies: 1 comment
-
Try Conn::new: let conn = mysql::Conn::new(connection_url)?;
Please note, that there is no feature flag, that you can disable to exclude mysql::Pool from the build, but it looks like a good idea to add one.
Looks like there would be a round-trip to a RDS proxy rather than to an actual database server on every new connection, but I guess that it's better not to use mysql::Pool in the lambda environment. |
Beta Was this translation helpful? Give feedback.
-
I am using Amazon RDS Proxy, so really there's no concern for connection pooling since that is being outsourced to that service instead.
I'm not sure if there's any penalty to also using a pool in my Rust client code, but the code is executed in a Lambda so ideally the smallest binary would be attained by excluding as many features as possible.
Is there a simple example someone can post for establishing a connection without a pool?
Beta Was this translation helpful? Give feedback.
All reactions