Creating the new CloudFormation stack for production

We are going to reuse the exact same template we used for staging. In your Terminal, go to the location you used to generate the nodeserver template and then run the same command as before, but this time with the stack name helloworld-production:

$ aws cloudformation create-stack 
      --capabilities CAPABILITY_IAM 
      --stack-name helloworld-production 
      --template-body file://nodeserver.template 
      --parameters ParameterKey=KeyPair,ParameterValue=EffectiveDevOpsAWS   

We can then run the following command to wait for the stack to be ready:

$ aws cloudformation wait stack-create-complete 
      --stack-name helloworld-production  
You might realize the weakness of our production stack with only one EC2 instance in it. We will address that concern in Chapter 5, Scaling Your Infrastructure when we talk about scaling strategies.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset