[英]Receive a request through AWS API Gateway using websockets and invoke a php script using AWS Lambda
Kinda lost on which services do I need to use, the idea is to build a server-less application using AWS services, here's a more detailed explanation on I'm looking for:我有点迷失了我需要使用哪些服务,这个想法是使用 AWS 服务构建一个无服务器应用程序,这是我正在寻找的更详细的解释:
So what I want to accomplish is to avoid using HTTP until point 5, now I'm totally lost in regards to this being doable or not, where do I host my php files?所以我想要完成的是避免使用 HTTP 直到第 5 点,现在我完全不知道这是否可行,我在哪里托管我的 php 文件? do I need to use AWS SQS to invoke the lambda function?
我是否需要使用 AWS SQS 来调用 lambda function?
Any help would be appreciated guys, trying to ready through the official Amazon documentation is quite complex.任何帮助将不胜感激,尝试通过亚马逊官方文档进行准备非常复杂。
AWS Lambda Function is essentially a container that runs on a certain runtime. AWS Lambda Function 本质上是一个运行在某个运行时的容器。
Since PHP is not supported as an out-of-the-box runtime, you'll have to use a custom runtime.由于不支持 PHP 作为开箱即用的运行时,因此您必须使用自定义运行时。
Here's a great example by AWS for creating a Layer for PHP - https://github.com/aws-samples/php-examples-for-aws-lambda/tree/master/0.1-SimplePhpFunction这是 AWS 为 PHP - https 创建层的一个很好的示例://github.com/aws-samples/php-examples-for-aws-lambda/tree/master/0.1-SimplePhpFunction
Another example, this one is for creating a custom runtime for PHP by using Docker - https://github.com/aws-samples/php-examples-for-aws-lambda/tree/master/0.7-PHP-Lambda-functions-with-Docker-container-images另一个示例,此示例用于通过使用 Docker - https://github.com/aws-Lambda-samples//php-master/aws-PHP-samples/function- -with-Docker-container-images
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.