【发布时间】:2021-08-26 07:03:10
【问题描述】:
我正在使用基于 Windows 2019 Base AMI (ami-0fa60543f60171fe3) 构建的自定义 AMI 来创建 Windows 服务器。但我看到用户数据不起作用。这是我正在使用的 CFT。
RabbitMQServer:
Type: AWS::EC2::Instance
Properties:
KeyName: !Ref PublicKeyName
IamInstanceProfile: !Ref IamInstanceProfile
ImageId: !Ref RabbitMQServerAMI
InstanceType: !Ref RabbitMQServerInstanceType
Monitoring: true
SecurityGroupIds:
- !Ref PrivateInstanceSG
SubnetId: !Ref PrivateSubnetID
UserData: !Base64 |
<script>
echo Current date and time >> C:\test.log
echo %DATE% %TIME% >> C:\test.log
</script>
<persist>true</persist>
【问题讨论】:
标签: amazon-web-services amazon-ec2 amazon-cloudformation