DenCowboy
DenCowboy

Reputation: 15076

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?

Upvotes: 0

Views: 213

Answers (1)

Nikita Kosych
Nikita Kosych

Reputation: 121

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

Upvotes: 1

Related Questions