簡體   English   中英

如何從彈性豆莖上的 PHP 按需運行 python 腳本?

[英]How can I run a python script on demand from my PHP on Elastic beanstalk?

我在 Elastic beanstalk (AWS) 上設置了 PHP web 應用程序,但我想按需運行 python 腳本(單擊按鈕)。 我的 python 腳本將更新數據庫,感謝 PHP,我將提取結果。 我不知道是否有人對此有很好的建議,以及是否有人可以解釋如何做,因為我找不到關於這個主題的明確解釋。

一個非常好的替代方案是在 Python 中創建一個 AWS Lambda function,由 AWS ZDB974238714CA8ADE4FZA 觸發,如下架構:

在此處輸入圖像描述

In your PHP code, when the button is clicked, you will make an API Call to API Gateway, that will trigger the Lambda function, and update the database and return the desired result.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM