简体   繁体   中英

Access CloudFormation template in S3 from within Lambda

I want to use cfn_client.update_stack() in my lambda. Here for I have to access a CF template in my S3 bucket. The IAM role attached to the lambda is correct. I tried:

TemplateURL='s3://xxx/yyy/temp.yaml', 

But it wasn't working. The template is private so I cant use the Https:// url I assume?

How can I access the template or am I forced to download the template from the bucket inside the /tmp of my lambda and run it with template-body ?

aws cloudformation update-stack accepts "https". (at least from AWS boto3 documents), https://docs.aws.amazon.com/cli/latest/reference/cloudformation/update-stack.html#examples

I think in your case, you'll have to either give access to the lambda via https, or just download the template and use --template-body

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM