DEV Community

Deep Dive on Nested Template Concept with CodeCommit Repo

“ I have deep dive into the concept of nested template creation in codecommit repo for a parent template file. I have faced the limitation issue of envmap parameter to define in template.yaml file. So I got a solution to create a nested template. Pricing of codecommit repo depends on commit users.”

AWS CodeCommit is a version control service hosted by AWS that you can use to privately store and manage assets in the cloud. For information about pricing for codecommit, see Pricing.

Nested stacks are stacks created as part of other stacks. We can create it using the AWS::CloudFormation::Stack resource.

In this post, you will get to know how to create a nested template (child template) for the main template (parent template). Here I have created codecommit repo and template files.

Architecture Overview

Image description
The architecture diagram shows the overall deployment architecture with data flow, aws codecommit repo and template files.

Solution overview

The blog post consist of the following phases:

  1. Create of CodeCommit Repo with Buildspec.yml and Template.yaml File
  2. Create of Nested1-template.yaml File in CodeCommit Repo

Phase 1: Create of CodeCommit Repo with Buildspec.yml and Template.yaml File

  1. Open the CodeCommit console and create a repository named “Gluedt-repo”. Create a buildspec.yml file containing commands to store cloudformation templates in s3 bucket during pipeline run to deploy the template service. In template.yaml file, define of nested stack configuration parameters to connect it with nested1-template.yaml template file.

Image description

Image description

Image description

Image description

Phase 2: Create of Nested1-template.yaml File in CodeCommit Repo

Image description

Image description

Clean-up

Delete CodeCommit Repo.

Pricing

I review the pricing and estimated cost of this example.

Cost of CodeCommit = $0.00 for first 5 CodeCommit users = $0.0

Total Cost = $0.0

Summary

In this post, I showed “deep dive on nested template concept with codecommit repo”.

For more details on AWS CodeCommit, Checkout Get started AWS CodeCommit, open the AWS CodeCommit console. To learn more, read the AWS CodeCommit documentation.

Working with nested stack -

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html

Reference link for creation of glue using cloudformation -

https://dev.to/aws-builders/explore-customized-glue-parameters-database-table-and-partition-through-cloudformation-2fm7

Thanks for reading!

Connect with me: Linkedin
Image description

Top comments (0)