我有一个可以正常工作的 CloudFormation 模板,它创建了一个 AWS 实例 2 EBS 卷。卷在机器上通过 lsblk 可见。我只是在格式化和安装它们时遇到了麻烦。就好像 UserData 脚本根本没有运行一样。
这是一台 Ubuntu 14.04 机器。知道我可能做错了什么吗?
编辑:添加完整模板以供参考
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": ".",
"Parameters": {
"KeyName": {
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instance",
"Type": "AWS::EC2::KeyPair::KeyName",
"ConstraintDescription": "must be the name of an existing EC2 KeyPair.",
},
"InstanceType": {
"Description": "EC2 instance type",
"Type": "String",
"Default": "t2.medium",
"AllowedValues": [
"t2.micro",
"t2.small",
"t2.medium",
"c3.large",
"c3.xlarge",
"c4.large",
"c4.xlarge"
],
"ConstraintDescription": "must be a valid EC2 instance …
Run Code Online (Sandbox Code Playgroud)