AWS Classroom Series – 04/Feb/2021

Cloudformation contd..

  • Lets add the format version to Cloud formation json files Refer Here
  • Adding Format version
	"AWSTemplateFormatVersion" : "2010-09-09",
	"Resources": {
		"mys3bucket" : {
			"Type" : "AWS::S3::Bucket",
			"Properties" : {
				"BucketName": "qts3fromcftbd"

Scenario: Lets Create a virtual private cloud (VPC)

  • Choose a private network range Preview
  • Lets create one vpc manually Preview Preview Preview Preview Preview
  • Now lets try to create this from cloud formation template
  • Dev Setup:
    • Ensure Visual studio code is installed
    • Install cf extension Preview
  • Now Add a template with vpc resource Preview
  • Refer Here for the changes done
  • Now lets create a stack using this template Preview Preview Preview
  • In the template the cidr value is fixed to, if the users want to create a network with some other range they have to change template which is not a good sign, so to add flexibility of the users to pass values, lets use Cloud formation parameters Refer Here
  • Refer Here for the changeset
  • Now lets update the stack or delete and recreate Preview Preview Preview
  • It is a good practice to create parameters for all the possible changes that can happen in architecture
  • What will happen if i change certain values in cloudformation
  • Changes to properties in cloudformation might have
    • no impact
    • recreated
  • This is reflected in the documentation Preview
  • Exercise: Try changing CIDR value and observe the replace in the AWS Cloudformation stack.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin