如何在亚马逊的Elastic Beanstalk上安装Python脚本? [英] How do I install a Python script on Amazon's Elastic Beanstalk?

查看:90
本文介绍了如何在亚马逊的Elastic Beanstalk上安装Python脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我构建了一个可连续运行的Python脚本,可通过Amazon AWS的SNS服务生成推送通知.只要脚本在我的终端中运行,我的应用就可以接收推送通知.

I've built a Python script that runs continuously, generating push notifications through Amazon AWS's SNS service. As long as the script is running in my Terminal, then my app receives push notifications just fine.

我想将此脚本上移至Amazon的Elastic Beanstalk,但我陷入困境:如何以一种可以在Amazon上运行的方式捆绑脚本?

I'd like to move this script up to Amazon's Elastic Beanstalk, but I'm stuck: how do I bundle up the script in such a way that it'll run on Amazon?

我已经尝试了一些教程,但是大多数教程都旨在构建API或网络应用程序-我只是对运行脚本感兴趣.

I've tried several tutorials, but most of them are geared towards building API's or web apps - I'm just interested in running a script.

还-该脚本使用try/except语句,因此它很少崩溃-但是有办法自动重启脚本吗?

Also - the script uses try/except statements, so it only very rarely ever crashes - but is there a way to restart the script automagically?

推荐答案

这个已经回答过的SO问题可能会回答您的问题:

This Already-answered SO question might answer your question:

AWS Elastic Beanstalk,正在运行cronjob

这篇关于如何在亚马逊的Elastic Beanstalk上安装Python脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆