I am using below could formation template to create a EC2 machine and install elastic search on it using user data.
I have a key pair named "novus1" in my account. When I try creating a stack. I get Unrecognized resource types: [AWS::EC2::KeyPair::KeyName].
Is there any issue in the below JSON template? Any support is appreciated.
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Basic template for Novus",
"Resources": {
"novus1": {
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the web server",
"Type": "AWS::EC2::KeyPair::KeyName"
},
"Ec2Instance1": {
"Type": "AWS::EC2::Instance",
"Properties": {
"InstanceType": "t2.micro",
"ImageId": "ami-4836a428",
"KeyName": "novus1",
"UserData": {
"Fn::Base64": {
"Fn::Join": ["", [
"rpm -ivh elasticsearch-5.2.1.rpm"
]]
}
}
}
}
}
}