To do so, we’ll add an echo command to the file as shown in this template snippet: If you update the stack from the AWS Management Console, you will notice that the parameters that were used to create the initial stack are prepopulated on the Parameters page of the Update Stack wizard.If you use the command, be sure to type in the same values for the parameters that you used originally to create the stack.To do so, simply add the additional packages and files along with any additional services to the configuration and then update the stack to deploy the changes.
The snippet also shows the Services section, which ensures that the Apache Web Server is running.
With AWS Cloud Formation, you can update the properties for resources in your existing stacks.
These changes can range from simple configuration changes, such as updating the alarm threshold on a Cloud Watch alarm, to more complex changes, such as updating the Amazon Machine Image (AMI) running on an Amazon EC2 instance.
The following snippet from the same Amazon EC2 resource in the template shows the pieces necessary to configure cfn-hup to call cfn-init to update the software if any changes to the metadata are detected: This example uses a single Amazon EC2 instance, but you can use the same mechanisms on more complex solutions that make use of Elastic Load Balancers and Auto Scaling groups to manage a collection of application servers.
There are, however, some special considerations for Auto Scaling groups.