Reputation: 443
I saw the following code in the begining of the userdata script. What is it for?
if (${PROXY}) {
&"cfn-init.exe" -v -s ${STACK_ID} -r ${RESOURCE} --region ${REGION} --http-proxy=${PROXY} --https-proxy=${PROXY}
} else {
write-host "Unable to determine Proxy setting"
&"cfn-init.exe" -v -s ${STACK_ID} -r ${RESOURCE} --region ${REGION}
}
Upvotes: 1
Views: 1631
Reputation: 8401
"cfn-init.exe" is a utility from cloudformation to execute instance initialization provisioning defined in cloudformation template .
This ensures the server initialization configurations defined under "AWS::CloudFormation::Init" section inside the cloud formation template is executed.
Please check the following documentation for reference http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-init.html
Upvotes: 1