如何配置 lambda 服务



假设我正在通过 CF 部署一个 AWS lambda 应用程序。 如何向其传递任何配置参数?

例如,我想传递生成的存储桶引用之一,以便可以在代码中使用它。

这是 lambda 函数的有效 cloudformation 参数

{
   "Type" : "AWS::Lambda::Function",
   "Properties" : {
   "Code" : Code,
   "Description" : String,
   "Handler" : String,
   "MemorySize" : Integer,
   "Role" : String,
   "Runtime" : String,
   "Timeout" : Integer
 }
}

如果要传递模板中定义的参数,可以在参数部分指定并使用 ref 和 join 函数有关详细信息,请参阅:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-join.html

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html

最新更新