简体   繁体   English

在 AWS Lambda 上运行 UI 应用程序

[英]Running a UI application on AWS Lambda

Is there a way to run a dynamic UI based application on AWS Lambda?有没有办法在 AWS Lambda 上运行基于动态 UI 的应用程序? If not , why doesn't AWS Lambda fit this use case?如果不是,为什么 AWS Lambda 不适合这个用例? Since HTTP traffic is stateless and since session can be maintained in a backing datastore , what restricts lambda from hosting a dynamic web application?由于 HTTP 流量是无状态的,并且会话可以在后备数据存储中维护,那么是什么限制了 lambda 托管动态 Web 应用程序?

No you cannot run.不,你不能跑。 It is to build/run the APIs of your backend as microservices(serverless architecture).它将后端的 API 构建/运行为微服务(无服务器架构)。 You can either use S3 bucket or Elastic bean stalk to host your UI application.您可以使用 S3 存储桶或 Elastic bean stalk 来托管您的 UI 应用程序。

No you don't host your web interface lambda.不,您没有托管您的 Web 界面 lambda。 You can utilize S3 static website hosting for hosting your HTML and JS code.您可以利用 S3 静态网站托管来托管您的 HTML 和 JS 代码。 Lambda can be utilized to provide a backend for any APIs that you need to utilise in your JS code. Lambda 可用于为您需要在 JS 代码中使用的任何 API 提供后端。

Here is a sample architecture and tutorial to learn more about这是一个示例架构和教程,以了解更多关于

在此处输入图片说明

Source : Build a Serverless Web Application来源: 构建无服务器 Web 应用程序

Even though lambda is not designed to host UI application, it doesn't mean that its impossible to do so.尽管 lambda 不是为托管 UI 应用程序而设计的,但这并不意味着它不可能这样做。 I had success running nodejs express server in lambda where the express endpoints returned html/css.我在 lambda 中成功运行了nodejs express服务器,其中 express 端点返回了 html/css。

when it comes to server side sessions, the session could be saved on the database since lambda is stateless.当涉及到服务器端会话时,会话可以保存在数据库中,因为 lambda 是无状态的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在哪里将AWS Lambda代码集成到Angular应用程序中? - Where to integrate AWS Lambda Code in an Angular Application? 使用 HTTP 从 Angular 应用程序中调用 AWS Lambda 函数 - Invoke AWS Lambda function from within an Angular application using HTTP 是否可以在不运行应用程序的情况下在设计时查看角度应用程序的UI? - Is there a way to see the UI of an angular application in design time without running the application? AWS Lambda上的Angular 4 Universal - Angular 4 Universal on AWS Lambda 在 Angular 11 中,如何 HTTP 通过 ZDB974238714CA3A434A7CE1D08 网关将应用程序/json POST 到 AWS Lambda - In Angular 11, how to HTTP POST application/json to AWS Lambda via API Gateway? 如何使用 AWS CloudFront S3 Lambda 部署 Angular 通用应用程序而不是运行 EC2 服务器? - How can I deploy Angular Universal App with AWS CloudFront S3 Lambda instead of running a EC2 server? Angular 通用与 AWS Lambda - 类型错误 - Angular Universal with AWS Lambda - TypeError AWS Cloudfront 错误与 lambda function - AWS Cloudfront error with a lambda function AWS 无服务器 Lambda + Angular - TypeError:express 不是函数 - AWS Serverless Lambda + Angular - TypeError: express is not a function 如何使用Aws Lambda(python)接收文件 - How to receive a file with an Aws Lambda (python)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM