Hi Jaime, I now have 4 production web2py apps that have been up and running on Lambda for many months now with no issues. It is easily maintainable and I can update/deploy with a single command line: zappa update
As for the databases, the DB doesn't have to be AWS. You can connect to any database you like with the URL in the connection string in the DAL constructor. Out of my 4 apps: 2 of them use MySQL RDS on AWS 1 of them uses MySQL Aurora on AWS 1 connects to a non-AWS in-house database on a dedicated server at a non-AWS data center. The only issue with lambda, and it is a minor one, is that each idle lambda instance will go to sleep after about 10 minutes and then take about 10 seconds to spin up again. So when your number of concurrent requests hits a new high water mark for the last 10 minutes or so, that last user will have to wait up to 10 seconds for his request to get served. This is easily fixed by using https://www.lambdawarmer.com -- It's cheap and I use this to keep 8 instances warm. Zappa out of the box only lets you keep 1 instance warm. On Tuesday, August 20, 2019 at 7:05:17 AM UTC-5, Jaime Sempere wrote: > > That's receipe is great, thanks for the work. > > One thing that I have not seen is which database are you using? I think > with Zappa you need to use RDS, at least that's what I have seen with > Django apps. > > So, I would like to ask you two questions: > > 1) Can you confirm about the database (is a RDS)? > 2) After this time using Zappa+web2py for Lambda... is it a robust and > mantainable environment? Have you confronted any important issues? > > I am asking #2, because for me lambda + web2py would be a win-win, but I > find it somekind of 'mixing too much environments/framework'... I smell > danger xD So, I would like to know if I can use it as a 'robust/final' > solution for my projects. > > Thanks in advance > > > El miércoles, 28 de noviembre de 2018, 20:06:34 (UTC+1), [email protected] > escribió: >> >> Thank you Anthony, I added the wsgibase wrapper after my initial post. I >> was modifying gluon/main.py but I added the wrapper (lambda_handler.py) to >> avoid that. >> >> I confirmed which environ variables are coming through as unicode and >> submitted an issue to zappa. >> https://github.com/Miserlou/Zappa/issues/1713 >> >> I'll also modify the recipe to make it more clear that this is likely a >> zappa and not a web2py issue. >> >> On Wednesday, November 28, 2018 at 8:39:51 AM UTC-6, Anthony wrote: >>> >>> On Tuesday, November 27, 2018 at 6:51:54 PM UTC-5, [email protected] >>> wrote: >>>> >>>> I've created a first pass at an AWS Lambda deployment recipe which uses >>>> an open-source tool called Zappa. >>>> >>>> I welcome any comments or suggested improvements. In particular, step >>>> 3 requires modifying gluon/main.py which I would like to avoid. >>>> >>> >>> I wouldn't say that is modifying gluon/main.py -- it is simply providing >>> a wrapper around gluon.main.wsgibase. In fact, the web2py gaehandler.py >>> handler does something very similar: >>> https://github.com/web2py/web2py/blob/master/handlers/gaehandler.py#L83. >>> >>> Note, according to PEP 3333, strings passed to the server should not be >>> unicode: https://www.python.org/dev/peps/pep-3333/#unicode-issues. >>> >>> Actually, it looks like Zappa is already handling this here: >>> https://github.com/Miserlou/Zappa/blob/master/zappa/wsgi.py#L110 (see >>> also, https://github.com/Miserlou/Zappa/blob/master/zappa/wsgi.py#L110). >>> Perhaps there is still some unicode getting through from Zappa, so maybe >>> you can open an issue with Zappa. >>> >>> Anthony >>> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/048040b1-2d46-43a1-93d6-66dfbe6667ea%40googlegroups.com.

