I tried other templates from the net but still getting the same error. Error
сообщение: шаблон содержит ошибки .: ошибка формата шаблона: должен быть определен хотя бы один член ресурсов.
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "TTND AWS CloudFormation template to launch first instance",
"Parameters" : {
"KeyName" : {
"Description" : "EC2 Key Pair for SSH Access",
"Default" : "sample",
"MinLength": "1",
"MaxLength": "64",
"AllowedPattern" : "[-_ a-zA-Z0-9]*",
"ConstraintDescription" : "can contain only alphanumeric characters, spaces, dashes and underscores."
},
"InstanceType" : {
"Description" : "Instance1 EC2 instance type",
"Type" : "String",
"Default" : "t2.micro",
"AllowedValues" : [ "t2.micro","m1.small","m1.medium","m1.large"],
"ConstraintDescription" : "must be a valid EC2 instance type."
}
},
"Mappings" : {
"AWSInstanceMapping" : {
"t2.micro" : { "Arch" : "64" },
"t2.small" : { "Arch" : "64" },
"t2.medium" : { "Arch" : "64" },
"t2.large" : { "Arch" : "64" },
"m3.medium" : { "Arch" : "64" },
"m4.large" : { "Arch" : "64" },
"m4.xlarge" : { "Arch" : "64" },
"m4.2xlarge" : { "Arch" : "64" }
}
},
"InstanceAMI" : {
"us-east-1" : { "64" : "ami-09ca8e1e" }
},
я пробовал другие шаблоны для сети, но та же ошибка, которую я получаю
"Resources" : {
"VPC" : {
"Type" : "AWS::EC2::VPC",
"Properties" : {
"CidrBlock" : "10.0.0.0/16",
"Tags" : [
{"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"} },
{ "Key": "Name", "Value": "Project_VPC"},
{"Key" : "Network", "Value" : "Public" }
]
}
},
"PublicSubnet" : {
"Type" : "AWS::EC2::Subnet",
"Properties" : {
"VpcId" : { "Ref" : "VPC" },
"CidrBlock" : "10.0.0.0/24",
"Tags" : [
{"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"} },
{"Key" : "Network", "Value" : "Public" },
{ "Key": "Name", "Value": "Project_Public_Subnet"}
]
}
},
"InternetGateway" : {
"Type" : "AWS::EC2::InternetGateway",
"Properties" : {
"Tags" : [
{"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"} },
{"Key" : "Network", "Value" : "Public" },
{ "Key": "Name", "Value": "Project_Internetgateway"}
]
}
},
"AttachGateway" : {
"Type" : "AWS::EC2::VPCGatewayAttachment",
"Properties" : {
"VpcId" : { "Ref" : "VPC" },
"InternetGatewayId" : { "Ref" : "InternetGateway" }
}
},
"PublicRouteTable" : {
"Type" : "AWS::EC2::RouteTable",
"Properties" : {
"VpcId" : {"Ref" : "VPC"},
"Tags" : [
{"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"} },
{"Key" : "Network", "Value" : "Public" },
{ "Key": "Name", "Value": "cloudwords_public_routetable"}
]
}
},
часть кода, который я удалил для публикации, выдает большую ошибку кода, поэтому
"Outputs" : {
"InstanceId" : {
"Description" : "InstanceId of the newly created instance",
"Value" : { "Ref" : "Instance" }
},
}
}
Если у кого-то есть простой шаблон запуска экземпляра AWS EC2 с использованием шаблона CloudFormation, пожалуйста, напишите