AWS Deployment

87 views
Skip to first unread message

Hadi Zarkoob

unread,
May 26, 2023, 7:43:36 PM5/26/23
to py4web
Hi all,

AWS is currently a popular environment for deploying web applications. However, I haven't come across many resources specifically on deploying Py4Web apps to AWS. For instance, the official tutorial only provides instructions for deploying to Google App Engine. I'm curious about the potential reasons for this. I can think of two reasons:

(Reason 1) There may already be ample resources available that describe how to deploy Python-based (such as Django or Flask) apps to AWS. The steps outlined for these frameworks can be adapted to deploy Py4Web apps on AWS as well. 

(Reason 2) There could be certain challenges associated with deploying Py4Web apps to AWS. It is recommended to deploy Py4web apps to alternative platforms such as Google App Engine.

I wonder which of these reasons is the case.

Thank you!
Hadi






Dave S

unread,
Jun 2, 2023, 9:04:04 PM6/2/23
to py4web
I think it's just that no one has documented it yet.  I haven't yet tried py4web locally, much less hosted, but I'm confident that you'll find it straight forward.

My experience setting up web2py on AWS was pretty simple.  It's much like the Centos/Redhat environment.  Nginx and Postgres were no problem.  I did start with the web2py's Rocket server, but the certificate support is easier using Nginx.  My certificates were from Let's Encrypt.

If you're doing command line stuff, there are a couple places where AWS uses the Ubuntu-style commands, but installation is with yum.  Service start/stop might have been Ubuntu-style, or maybe it was cron.

I had everything on one instance, and had no problem with hits about every second once I figured out the Postgres stuff to stop it's memory footprint from growing.  I think it took creating an index to do the scrubbing, but it's been a couple of years since I touched that, I'm not a DB analyst, and the server went down with the ship when Startup Land finally claimed its victim.  

I didn't do clustering/roundrobin-ing.  About the only failures I had were due to the Postgres memory naive setup, and that went away as I climbed the learning curve.  For mail, which was mainly for reports, I used the native sendmail rather than the AWS mail server.  I didn't get into to Elastic shards because we did pretty simple traffic analysis (number of requests per country, using IP data, how often a client returned to the site, etc).


/dps

Hadi Zarkoob

unread,
Jun 3, 2023, 5:10:45 PM6/3/23
to py4web

Thank you for your valuable insights!

Hadi Zarkoob

unread,
Jun 3, 2023, 5:13:07 PM6/3/23
to py4web
I would like to take this opportunity to offer a suggestion to the developers of py4web. I believe that creating a guideline outlining a standard deployment of py4web using popular AWS services such as Cognito for authentication/authorization, and Fargate with autoscaling capabilities, could greatly contribute to expanding the framework's reach in the web development market. This, in turn, would allow a larger audience to benefit from the py4web framework.

I understand that AWS offers numerous features, and it would be impractical, as well as beyond the scope, to cover them all. However, providing a guide for a typical deployment would go a long way. Essentially, it should suffice to replicate the same architecture described in the Google App Engine example but adapt it to the AWS environment.

kenny chung

unread,
Jun 3, 2023, 7:59:17 PM6/3/23
to Hadi Zarkoob, py4web
I agree that its great to have a guide on the deployment process. I like web2py and wish there were more deployment guide similar to fastapi and flask.

--
You received this message because you are subscribed to the Google Groups "py4web" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py4web+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/py4web/b31830e1-4e38-44a6-a55d-0114b0dd26bcn%40googlegroups.com.

Massimo

unread,
Jun 4, 2023, 11:26:14 PM6/4/23
to py4web
I recognize the importance of this. time is the major constraint but will try. I will definitively help promote the work of people who want to contribute.

Hadi Zarkoob

unread,
Jun 4, 2023, 11:41:20 PM6/4/23
to py4web
Thank you!

If I ever end up doing it, I will make sure to document and share it as well.
Reply all
Reply to author
Forward
0 new messages