1
Windows 인스턴스를 초기화하는 동안 파일을 다운로드해야합니다. 나는합니다 (Windows Roles and Features template의 단순화 된 버전을 사용) Google 로고를 다운로드하려면 다음 스크립트를 사용하고이를 테스트하려면 :이 오류없이 실행하지 ... 그리고 어떤 파일이 완료CloudFormation 스크립트에서 파일을 다운로드하지 않는 이유는 무엇입니까?
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Test download.",
"Resources" : {
"InstanceSecurityGroup" : {
"Type" : "AWS::EC2::SecurityGroup",
"Properties" : {
"GroupDescription" : "Enable RDP",
"SecurityGroupIngress" : [
{"IpProtocol" : "tcp", "FromPort" : "3389", "ToPort" : "3389", "CidrIp" : "0.0.0.0/0"}
]
}
},
"WindowsServer": {
"Type" : "AWS::EC2::Instance",
"Metadata" : {
"AWS::CloudFormation::Init" : {
"config" : {
"files" : {
"c:\\test\\google-logo.png" : {
"source" : "http://www.google.com/images/srpr/logo4w.png"
}
}
}
}
},
"Properties": {
"InstanceType" : "m1.small",
"ImageId" : "ami-bbf2e1cf",
"SecurityGroups" : [ {"Ref" : "InstanceSecurityGroup"} ],
"KeyName" : "POP",
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
"<script>\n",
"cfn-init.exe -v -s ", { "Ref" : "AWS::StackId" },
" -r WindowsServer",
" --region ", { "Ref" : "AWS::Region" }, "\n",
"</script>"
]]}}
}
},
"WindowsServerWaitHandle" : {
"Type" : "AWS::CloudFormation::WaitConditionHandle"
},
"WindowsServerWaitCondition" : {
"Type" : "AWS::CloudFormation::WaitCondition",
"DependsOn" : "WindowsServer",
"Properties" : {
"Handle" : {"Ref" : "WindowsServerWaitHandle"},
"Timeout" : "1800"
}
}
}
}
. 내가 어디로 잘못 가고 있니?
너무 나를 위해 일한 직후 - 기괴한. 확인할 시간을내어 주셔서 감사합니다. – Jonathan