gpt4 book ai didi

amazon-web-services - AWS SAM(无服务器应用程序模型)和无服务器框架有什么区别?

转载 作者:行者123 更新时间:2023-12-04 10:22:53 24 4
gpt4 key购买 nike

我们正在研究项目,我们正在尝试在 nodejs 中构建无服务器应用程序。我遇到了 AWS SAM 和无服务器的术语。哪个最适合实现无服务器应用程序

最佳答案

您可以查看这篇文章比较 SAM and Serverless

该页面上列出的主要区别如下

The Serverless Framework is a framework that makes it easy to write event-driven functions for a myriad of providers, including AWS, Google Cloud, Kubeless and more. For each provider, a series of events can be configured to invoke the function. The framework is open source and receives updates regularly.

The AWS Serverless Application Model (SAM) is an abstraction layer in front of CloudFormation that makes it easy to write serverless applications in AWS. There is support for three different resource types: Lambda, DynamoDB and API Gateway. Using SAM Local, Lambda and API Gateway can be run locally through the use of Docker containers.

Both frameworks have in common that they generate CloudFormation. In other words: they both abstract CloudFormation so that you need to write less code to build serverless applications (in the case of SAM) and to deploy Lambda functions (for both SAM and Serverless). The biggest difference is that Serverless is written to deploy FaaS (Function as a Service) functions to different providers. SAM on the other hand is an abstraction layer specifically for AWS using not only FaaS but also DynamoDB for storage and API Gateway for creating a serverless HTTP endpoint.

Another difference is that SAM Local allows you to run Lambda functions locally and to spin up an API Gateway locally. This makes it easier to develop and test Lambda functions without deploying them to AWS. With the Serverless framework you can also invoke Lambda functions from the command line, but only if they are deployed to AWS and available through API Gateway.

关于amazon-web-services - AWS SAM(无服务器应用程序模型)和无服务器框架有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52228361/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com