export VAR_HOST=
- !GetAtt
- ElasticacheCluster
- ConfigurationEndpoint.Address
export VAR_PORT=
- !GetAtt
- ElasticacheCluster
- ConfigurationEndpoint.Port
答案 0 :(得分:1)
您不需要使用!GetAtt。您可以执行以下操作:
UserData: !Sub |
export VAR_HOST=${ElasticacheCluster.ConfigurationEndpoint.Address}
export VAR_PORT=${ElasticacheCluster.ConfigurationEndpoint.Port}