SAM模板和Cloudformation模板之间的区别 [英] Difference between SAM template and Cloudformation template

查看:141
本文介绍了SAM模板和Cloudformation模板之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现很难理解SAM模板和Cloudformation模板之间的区别。我知道SAM模板可用于定义Lambda等无服务器应用程序,但这与Cloudformation模板有何不同?语法不同吗?我仍然可以在cloudformation模板中指定Lambda定义。所以,我的问题是为什么我应该关心SAM?

I'm finding it hard to understand the difference between SAM template and Cloudformation template. I know that SAM template can be used to define Serverless Applications like Lambda, but how does that make it different from Cloudformation template? Is the syntax different? I can still specify the Lambda definitions in cloudformation template. So, my question is why should I care about SAM? Won't knowing about just cloud formation template be sufficient?

推荐答案

从CloudFormation的角度来看,SAM是一种转变。含义:SAM模板在语法上是等效的,但是它们使您可以更简洁地定义无服务器应用程序。 SAM模板最终在后台扩展为完整的CFN。如果您已经知道CFN,但想编写更少的YAML代码,则SAM可能对您有益。这样做是为了减少您的工作量。

From CloudFormation's perspective, SAM is a transform. Meaning: SAM templates are syntactically equivalent, but they allow you to define your serverless app with more brevity. The SAM template eventually gets expanded into full CFN behind the scenes. If you already know CFN, but want to write less YAML code, SAM may be beneficial to you. The idea is to reduce your effort.

这篇关于SAM模板和Cloudformation模板之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆