EIP分配給VPC的自動配置功能組我想我分配在VPC保留彈性IP的(EC2經典IP)來自動配置功能組中的一個。使用AWS CLI的我搬到IP到VPC:如何Cloudformation模板
$ aws ec2 move-address-to-vpc --public-ip 23.23.23.23
而且在AWS檢測控制檯看到,該IP傳遞到VPC。 並在Cloudformation模板AutoscalingGroup的標籤分配中的資源:
"Process": {
"Type" : "AWS::AutoScaling::AutoScalingGroup",
"Properties": {
"LaunchConfigurationName": {"Ref": "PreprocessorLC"},
"LoadBalancerNames": [{"Ref": "ProcessELB"}],
"VPCZoneIdentifier" : [{ "Fn::Join" : [",", [ { "Ref" : "PublicSubnet1"}, { "Ref" : "PublicSubnet2"} ]]}],
"AvailabilityZones": {"Ref": "AZs"},
"MinSize" : "1",
"MaxSize" : "1",
"HealthCheckGracePeriod": 300,
"Tags" : [
{"Key": "Name", "Value": {"Fn::Join": ["", [{"Ref": "Env"}, "-Process"]]}, "PropagateAtLaunch": true},
{"Key": "WorkersScalingGroup", "Value": {"Fn::Join": ["", ["Offering-", {"Ref": "Env"}, "-Process-Worker"]]}, "PropagateAtLaunch": true},
{"Key": "EIP", "Value": {"Ref": "ProcessIP"}, "PropagateAtLaunch": true},
{"Key": "Environment", "Value": {"Ref": "Env"}, "PropagateAtLaunch": true}
]
}
}
而在參數 「ProcessIP」 增值:
"ProcessIP":{
"Description": "DEV: 23.23.23.23",
"Type": "String",
"Default": "23.23.23.23",
"AllowedValues": ["23.23.23.23"]
}
而且它並沒有奏效。仍然獲得隨機IP。 如果有人可以知道我錯了什麼,或者應該添加什麼來使它工作?
謝謝!
有關aws論壇上類似方法的討論https://forums.aws.amazon.com/message.jspa?messageID=498761 – Vorsprung