4 ms·
Has anyone used RDS from lambda? Don't want to use Dynamo but perhaps for some key Val store.
by buckbova 9y ago
Has anyone used RDS from lambda? Don't want to use Dynamo but perhaps for some key Val store.
- cyberferret 9y agoNot RDS, but we've had good results with KeyVal stores using RethinkDB running on a Micro EC2 instance from Lambda...
- djhworld 9y agoYep, very easy with JDBC + APIs like JOOQ. The "interesting" part is how to secure user credentials to login to the RDS instance, and manage connection pools etc, but it's not that difficult
- jedberg 9y ago> The "interesting" part is how to secure user credentials to login to the RDS instance, and manage connection pools etc, but it's not that difficult You can run your RDS instances and your Lambda's in the same private VPC. It doesn't secure your credentials per se, but it does prevent anyone else from accessing your database with Lambda.
- defen 9y agoThe "problem" with putting Lambdas into a private VPC is that then you need to do NAT, which means permanent infrastructure (NAT gateways, failover, scaling...). It can be done but there are more headaches than with a pure serverless solution. Unless things have changed since the last time I looked at this stuff.
- mnm1 9y agoYou just need a private subnet, not a whole separate VPC. You still need NAT to get outbound access, but instead of running a random EC2 instance for the NAT, AWS now has a NAT you can deploy with a click or API call. You still pay for it, but it's at least much easier to set up and there's no maintenance. I assume they have redundancy and failover and such built in also.
- bni 9y agoSadly putting Lambdas in your dedicated VPC introduces cold start times of sometimes ~5 seconds. Yes, seconds.
- jaxondu 9y agoHopefully we will see AWS release a managed serverless SQL db solution at re:Invent 2017. Like DynamoDB but for SQL.
- davnicwil 9y ago> Like DynamoDB but for SQL This would basically be the game-changer for building backends on lambda. The absolute key and most valuable piece in most backends is the persistent datastore. I absolutely want to build functional stateless business logic on lambda, but I absolutely will not, no matter the gain from not having to manage servers, have my database be dynamodb or any other non-RDBMS, for any serious application in 2017.
- ranman 9y agoWhy not? Plenty of serious companies use DDB or MongoDb or plenty of other databases for their "serious applications"... this seems like a rule based on a bad experience. Would love to hear about it.
- davnicwil 9y agoWhy not? Well, a caveat: I will always use an RDBMS when the data is inherently relational. In a "serious application" (I realise the term serious is hyperbolic here and I shouldn't have used it) this is true most of the time. If it weren't true, then of course I might consider using DynamoDB or similar. But I think these situations are few and far between. I'm often wrong though and happy to learn about some counter examples if you have any / have my assumptions corrected.
- noway421 9y agoThere's Aurora which has scalable read replicas.