amazon-web-services - 从 Lambda 中访问 S3 中的 CloudFormation 模板

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

我想在我的 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/

相关文章:

android - 将图像从 Android 上传到 Amazon S3?

amazon-web-services - AWS Connect 和 Lex - 无法引用联系人属性

javascript - AWS rekognition 和 s3 存储桶区域

AWS Lambda 上的 Angular 4 Universal

java - 每次推送消息时AWS SQS : Is it a way SQS call me consumer,

php - Elastic Beanstalk CMD-AppDeploy Activity 失败(Composer 问题???)

ruby-on-rails - Puma 在 Elastic Beanstalk 的 Rails 6 API only 项目上遇到消息 "Early termination of worker"

amazon-web-services - 将 Amazon RDS 多可用区部署降级为标准部署

amazon-web-services - 在 Redshift 中作为选择插入

android - 如何使用具有私有(private)访问权限的 picasso 从aws加载图像