小编RMi*_*ish的帖子

如何将参数从 CloudFormation 传递到存储在 S3 存储桶中的 AWS Lambda 函数

我的 Lambda 代码存储在 S3 存储桶中。我使用 CloudFormation 在子帐户中进行部署。

Lambda 代码片段:

def lambda_handler(event,context):
  ids = ["${id}"]
Run Code Online (Sandbox Code Playgroud)

CloudFormation 使用参数将以下内容id作为:

Parameters:

    id:  
      Type: String
      Description: Name of id. 
      Default: abc
Run Code Online (Sandbox Code Playgroud)

但是,id不会在 lambda 中填充,因为代码存储在 S3 存储桶中。

怎么办?

amazon-s3 amazon-web-services aws-cloudformation aws-lambda

2
推荐指数
1
解决办法
4399
查看次数