I want to use aws lambda for creating a REST interface. As a database I have chosen RDS (presumably using MySQL), since my Data is highly relational and write intensive.
In the past I have used Django for Web backends, which I really liked. Theres a feature in particular that I am really missing for lambda, which is automatic Object generation and validation. Basically what this means is that Django can automatically generate MySQL schemas from a simple Python object and even validate User input. It also makes atomic transactions really easy.
Is there a similar functionality in Django? Basically a way to set some basic paramters like max length for a string, only positive numbers, etc, and create objects using standard JSON/Python objects?
The programming language can either be js or python.

  • Are you looking for a guide – or for addons/libraries?
    – Izzy
    Nov 24 '20 at 0:19
  • I think sequelize was what I was looking for Nov 24 '20 at 6:11
  • OK, so you were looking for software – and even found a matching one, great! May I suggest you answer your own question then? That shouldn't keep others from suggesting alternatives (might rather even motivate them, as it makes clearer what you're after). Thanks!
    – Izzy
    Nov 24 '20 at 16:51
  • done, i added it Nov 24 '20 at 20:07
  • Thanks, but… ugh… could you include a few more details – like how it fits your requirements, what makes it recommendable, where it can be found?
    – Izzy
    Nov 24 '20 at 20:40

I was looking for sequelize. Protipp: check out sequelize auto migrations, it can be found on https://sequelize.org/. It allows the creation of SQL relational data schemas within JS. One problem is, is that migration need to either be written manually, or the SQL shema be created before deployment. This can be solved by sequelize auto migrations, which will generate and run migration simply by looking at your models.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.