Last active
August 29, 2015 14:08
-
-
Save muhqu/2809c86fe92de0c3f713 to your computer and use it in GitHub Desktop.
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", | |
"Parameters" : { | |
"InstanceType" : { | |
"Description" : "WebServer EC2 instance type", | |
"Type" : "String", | |
"Default" : "m1.small", | |
"AllowedValues" : ["t1.micro","m1.small","m1.medium","m1.large","m1.xlarge","m2.xlarge","m2.2xlarge","m2.4xlarge","m3.medium","m3.large","m3.xlarge","m3.2xlarge","c1.medium","c1.xlarge","cc1.4xlarge","cc2.8xlarge","cg1.4xlarge"], | |
"ConstraintDescription" : "must be a valid EC2 instance type." | |
}, | |
"RootDeviceType" : { | |
"Description" : "WebServer EC2 instance type", | |
"Type" : "String", | |
"Default": "EBS", | |
"AllowedValues": ["EBS", "InstanceStore"], | |
"ConstraintDescription": "must be 'EBS' or 'InstanceStore'." | |
} | |
}, | |
"Conditions" : { | |
"RootDeviceTypeIsEBS" : {"Fn::Equals" : [{"Ref" : "RootDeviceType"}, "EBS"]} | |
}, | |
"Mappings" : { | |
"AWSInstanceType2Arch" : { | |
"t1.micro" : { "Arch" : "64" }, | |
"m1.small" : { "Arch" : "64" }, | |
"m1.medium" : { "Arch" : "64" }, | |
"m1.large" : { "Arch" : "64" }, | |
"m1.xlarge" : { "Arch" : "64" }, | |
"m2.xlarge" : { "Arch" : "64" }, | |
"m2.2xlarge" : { "Arch" : "64" }, | |
"m2.4xlarge" : { "Arch" : "64" }, | |
"m3.medium" : { "Arch" : "64" }, | |
"m3.large" : { "Arch" : "64" }, | |
"m3.xlarge" : { "Arch" : "64" }, | |
"m3.2xlarge" : { "Arch" : "64" }, | |
"c1.medium" : { "Arch" : "64" }, | |
"c1.xlarge" : { "Arch" : "64" }, | |
"cc1.4xlarge" : { "Arch" : "64HVM" }, | |
"cc2.8xlarge" : { "Arch" : "64HVM" }, | |
"cg1.4xlarge" : { "Arch" : "64HVM" } | |
}, | |
"AWSRegionArch2AMI4EBS" : { | |
"us-east-1" : {"64HVM":"ami-b66ed3de", "64":"ami-246ed34c"}, | |
"us-west-2" : {"64HVM":"ami-b5a7ea85", "64":"ami-55a7ea65"}, | |
"us-west-1" : {"64HVM":"ami-4b6f650e", "64":"ami-9b6e64de"}, | |
"eu-west-1" : {"64HVM":"ami-6e7bd919", "64":"ami-9c7ad8eb"}, | |
"eu-central-1" : {"64HVM":"ami-b43503a9", "64":"ami-9235038f"}, | |
"ap-southeast-1" : {"64HVM":"ami-ac5c7afe", "64":"ami-ba5c7ae8"}, | |
"ap-northeast-1" : {"64HVM":"ami-4985b048", "64":"ami-2385b022"}, | |
"ap-southeast-2" : {"64HVM":"ami-63f79559", "64":"ami-71f7954b"}, | |
"sa-east-1" : {"64HVM":"ami-8737829a", "64":"ami-9137828c"}, | |
"cn-north-1" : {"64HVM":"ami-ce46d4f7", "64":"ami-c846d4f1"} | |
}, | |
"AWSRegionArch2AMI4InstanceStore" : { | |
"us-east-1" : {"64HVM":"ami-0268d56a", "64":"ami-9a6ed3f2"}, | |
"us-west-2" : {"64HVM":"ami-f5a7eac5", "64":"ami-5ba7ea6b"}, | |
"us-west-1" : {"64HVM":"ami-2f6f656a", "64":"ami-bf6e64fa"}, | |
"eu-west-1" : {"64HVM":"ami-1278da65", "64":"ami-267bd951"}, | |
"eu-central-1" : {"64HVM":"ami-a03503bd", "64":"ami-84350399"}, | |
"ap-southeast-1" : {"64HVM":"ami-402d0b12", "64":"ami-702d0b22"}, | |
"ap-northeast-1" : {"64HVM":"ami-8985b088", "64":"ami-3985b038"}, | |
"ap-southeast-2" : {"64HVM":"ami-9ff795a5", "64":"ami-13f49629"}, | |
"sa-east-1" : {"64HVM":"ami-ef3782f2", "64":"ami-89378294"}, | |
"cn-north-1" : {"64HVM":"ami-3a47d503", "64":"ami-c446d4fd"} | |
} | |
}, | |
"Resources" : { | |
}, | |
"Outputs" : { | |
"ImageId": { | |
"Value": {"Fn::If": [ "RootDeviceTypeIsEBS", | |
{"Fn::FindInMap":["AWSRegionArch2AMI4EBS",{"Ref":"AWS::Region"},{"Fn::FindInMap":["AWSInstanceType2Arch",{"Ref":"InstanceType"},"Arch"]}]}, | |
{"Fn::FindInMap":["AWSRegionArch2AMI4InstanceStore",{"Ref":"AWS::Region"},{"Fn::FindInMap":["AWSInstanceType2Arch",{"Ref":"InstanceType"},"Arch"]}]} | |
]} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment