AWS SAM(无服务器应用程序模型)和无服务器框架有什么区别?
What's the difference between AWS SAM (Serverless Application Model) and serverless framework?
我们正在进行项目,我们正在尝试在节点 js 中构建无服务器应用程序。我遇到了 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.
SAM 和 SF 之间的最大区别:
1) SAM 仅适用于 AWS; SF 支持多个后端,因此它支持 multi/hybrid 云应用程序的部署。 SF 还支持 kubernetes 后端。
2) 对于 AWS,SAM 和 SF 模板都编译为 Cloudformation (CF)。 SAM 可以使用 Transform,本质上是 CF 的宏。
3) SAM写在Python;顺丰写在Javascript.
4) SF 有插件可以让你运行任何代码(包括非Javascript);这实际上意味着可以超越 Cloudformation (CF) 的限制,因为 CF 中始终不支持某些(新的)东西。插件系统也非常灵活,非常有用。
5) SF 变量系统更灵活,允许您根据其他参数(如舞台)的存在进行动态包含; SAM 变量更接近 CF。
我们正在进行项目,我们正在尝试在节点 js 中构建无服务器应用程序。我遇到了 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.
SAM 和 SF 之间的最大区别:
1) SAM 仅适用于 AWS; SF 支持多个后端,因此它支持 multi/hybrid 云应用程序的部署。 SF 还支持 kubernetes 后端。
2) 对于 AWS,SAM 和 SF 模板都编译为 Cloudformation (CF)。 SAM 可以使用 Transform,本质上是 CF 的宏。
3) SAM写在Python;顺丰写在Javascript.
4) SF 有插件可以让你运行任何代码(包括非Javascript);这实际上意味着可以超越 Cloudformation (CF) 的限制,因为 CF 中始终不支持某些(新的)东西。插件系统也非常灵活,非常有用。
5) SF 变量系统更灵活,允许您根据其他参数(如舞台)的存在进行动态包含; SAM 变量更接近 CF。