An existing EC2 fleet uses cfn-init to install application configuration from AWS::CloudFormation::Init metadata. Stack updates change that metadata without replacing instances, but the configuration files remain unchanged. Which approach best applies future metadata changes without replacing the instances?
Show the answer
Correct answerB. Configure cfn-hup with a metadata-change hook that invokes cfn-init.
AWhy not this: A CreationPolicy waits for creation signals; it does not run configuration after metadata updates.
BWhy this is right: cfn-hup monitors metadata and invokes a configured hook to reapply the changed configuration.
CWhy not this: cfn-signal reports completion status; it does not detect metadata changes or apply configuration.
DWhy not this: User data normally runs at first launch, so changing metadata does not cause it to execute again.
cfn-hup detects resource metadata changes and can invoke cfn-init through a hook to reapply configuration. Updating metadata alone does not rerun cfn-init, and user data does not normally rerun on existing instances.