Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (58 sloc) 1.73 KB
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "test EC2",
"Parameters": {
"KeyName": {
"Description" : "Name of an existing EC2 KeyPair",
"Type": "AWS::EC2::KeyPair::KeyName",
"ConstraintDescription" : "must be the name of an existing EC2 KeyPair."
}
},
"Resources": {
"WebServerSecurityGroup" : {
"Type" : "AWS::EC2::SecurityGroup",
"Properties" : {
"GroupDescription" : "Enable http access from anywhere and RDP from office",
"SecurityGroupIngress" : [
{"IpProtocol" : "tcp", "FromPort" : "80", "ToPort" : "80", "CidrIp" : "0.0.0.0/0"},
{"IpProtocol" : "tcp", "FromPort" : "3389", "ToPort" : "3389", "CidrIp" : "94.74.72.228/32"}
]
}
},
"EC2Instance": {
"Type" : "AWS::EC2::Instance",
"Properties" : {
"ImageId" : "ami-c8a9baa2",
"InstanceInitiatedShutdownBehavior" : "stop",
"InstanceType" : "c4.large",
"KeyName" : {
"Ref": "KeyName"
},
"Monitoring" : "true",
"SecurityGroupIds" : [ {
"Fn::GetAtt" : [ "WebServerSecurityGroup" , "GroupId" ]
} ],
"Tenancy" : "default",
"BlockDeviceMappings" : [
{
"DeviceName" : "/dev/sda1",
"Ebs" : { "VolumeSize" : "50" , "VolumeType" : "io1" , "Iops" : "1500" }
} ],
"Volumes" : [
{
"VolumeId" : { "Ref" : "EBSDisk" }, "Device" : "/dev/sdk"
} ]
}
},
"EBSDisk": {
"Type":"AWS::EC2::Volume",
"Properties" : {
"AvailabilityZone" : "us-east-1a",
"Encrypted" : "true",
"Iops" : "600",
"Size" : "20",
"VolumeType" : "io1"
}
}
}
}