我想在我的 lambda 中使用 cfn_client.update_stack()
。在这里,我必须访问 S3 存储桶中的 CF 模板。附加到 lambda 的 IAM 角色是正确的。
我尝试过:
TemplateURL='s3://xxx/yyy/temp.yaml',
但是它不起作用。该模板是私有(private)的,因此我无法使用我假设的 https://
url?
我如何访问模板,或者我是否被迫从 lambda 的 /tmp
内的存储桶下载模板并使用 template-body
运行它?
最佳答案
aws cloudformation update-stack 接受“https”。 (至少来自 AWS boto3 文档), https://docs.aws.amazon.com/cli/latest/reference/cloudformation/update-stack.html#examples
我认为在你的情况下,你必须通过 https 授予对 lambda 的访问权限,或者只下载模板并使用 --template-body
关于amazon-web-services - 从 Lambda 中访问 S3 中的 CloudFormation 模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70533165/