Created
November 16, 2011 00:49
-
-
Save farshidce/1368923 to your computer and use it in GitHub Desktop.
cf1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS CloudFormation Sample Template EC2InstanceSample: Create an Amazon EC2 instance running the Amazon Linux AMI. The AMI is chosen based on the region in which the stack is run. This example uses the default security group, so to SSH to the new instance using the KeyPair you enter, you will need to have port 22 open in your default security group. **WARNING** This template an Amazon EC2 instances. You will be billed for the AWS resources used if you create a stack from this template.", | |
"Parameters" : { | |
"KeyName" : { | |
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance", | |
"Type" : "String" | |
} | |
}, | |
"Mappings" : { | |
"RegionMap" : { | |
"us-east-1" : { "AMI" : "ami-2f2be946" } | |
} | |
}, | |
"Resources" : { | |
"Ec2Instance1" : { | |
"Type" : "AWS::EC2::Instance", | |
"Properties" : { | |
"KeyName" : { "Ref" : "KeyName" }, | |
"ImageId" : "ami-2f2be946", | |
"InstanceType" : "m1.large" | |
} | |
}, | |
"Ec2Instance2" : { | |
"Type" : "AWS::EC2::Instance", | |
"Properties" : { | |
"KeyName" : { "Ref" : "KeyName" }, | |
"ImageId" : "ami-2f2be946", | |
"InstanceType" : "m1.large" | |
} | |
}, | |
"Ec2Instance3" : { | |
"Type" : "AWS::EC2::Instance", | |
"Properties" : { | |
"KeyName" : { "Ref" : "KeyName" }, | |
"ImageId" : "ami-2f2be946", | |
"InstanceType" : "m1.large" | |
} | |
} | |
}, | |
"Outputs" : { | |
"PrivateIP1" : { | |
"Description" : "Private IP address of the newly created EC2 instance", | |
"Value" : { "Fn::GetAtt" : [ "Ec2Instance1", "PrivateIp" ] } | |
}, | |
"PrivateIP2" : { | |
"Description" : "Private IP address of the newly created EC2 instance", | |
"Value" : { "Fn::GetAtt" : [ "Ec2Instance2", "PrivateIp" ] } | |
}, | |
"PrivateIP3" : { | |
"Description" : "Private IP address of the newly created EC2 instance", | |
"Value" : { "Fn::GetAtt" : [ "Ec2Instance3", "PrivateIp" ] } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment