To update the application using CloudFormation, you update the data in the Metadata section of the Instance or LaucnConfig element. In your case, you change the value of the parameter referenced by the Metadata section. I assume the source is updated? The cron job for your instance (s) is configured to run cfn-hup, and when it does, it reads the information onto the CloudFormation stack and sees that it has changed. Then it performs the actions specified in the hooks.conf file (or in the files in the hooks.d directory), which is usually run by cfn-init. The cfn-init command extracts all files from the specified sources and runs all the commands specified in the "Metadata" section. The result is an updated application.
For the waiting condition, in order to βreactivateβ something would have to say this, which, by the way, I do not think is possible. Since the only thing you change is instance metadata, and all actions happen locally with the instance, I donβt think that what you are trying to do would be possible. A new wait condition should be created and signaled by a cfn signal (which, I believe, should be called in hooks.conf). An interesting scenario: what to do if the following happens: you rename the wait condition and change the metadata for the update. The instance cannot signal completely, and CloudFormation returns the template to its previous state. The next time cfn-hup is called, the instance sees that the stack has been changed, but the reverse hangs and cannot complete the recording again. Would we be stuck in an endless loop?
Edwin
source share