问题
I have a bit of a chicken and egg problem. I would like to set the Hostname during instance launch using UserData, but I need it to be an incremental one, such as
myapp01.us-west-2c.company.com
myapp02.us-west-2c.company.com
The AWS::AutoScaling::LaunchConfiguration can do this I believe for the key/tag pairs for Name. However, how can I get UserData to do something similar?
来源:https://stackoverflow.com/questions/40917209/setting-a-dynamic-hostname-on-aws-using-userdata