我正在使用cloudformation模板启动ec2实例并附加辅助ENI(已创建)。我正在将AutoScaling组与LaunchConfiguration一起使用。如何获取启动的ec2-instance的实例ID?
"NetworkInterfaceAttachment" : {
"Type" : "AWS::EC2::NetworkInterfaceAttachment",
"Properties" : {
"InstanceId" : <<How to get the instance id here>>
"NetworkInterfaceId" : { "Ref" : "SecondaryENI" },
"DeviceIndex" : "1"
}
}
有没有办法使launchconfig返回实例ID?