CloudFormation Nested Stack From Codecommit in a CodePipeline

0

How to implement Nested Stack files in one CodeCommit repository and use CodeDeploy in CodePipeline for deployment,

CodeCommit FileStructure Storage-Stack.yaml Backend-Stack.yaml Parent-Stack.yaml

how do we include the URL of the File from the Source Artifcat

Nafiu
已提問 9 個月前檢視次數 316 次
1 個回答
2
已接受的答案

You can use a CodePipeline Deploy stage that uses CloudFromation Stacks as the deployment provider, which should be easier than using CodeDeploy.

Before the Deploy stage, create Build stage that has a CLI command like: aws cloudformation package --template-file $TemplateName.yaml --s3-bucket $S3Bucket --s3-prefix $S3BuildsPrefix --output-template-file packaged-template.yaml

This allows your parent template to refer to nested stacks as relative paths in your source tree, and "cloudformation package" resolves these by uploading dependencies to S3 and changing references in your template to refer to them. It can deal with many types of dependencies - have a look at https://docs.aws.amazon.com/cli/latest/reference/cloudformation/package.html.

專家
已回答 9 個月前
profile picture
專家
已審閱 3 天前
profile picture
專家
已審閱 2 個月前
  • Thank you for the Help

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南