zoukankan      html  css  js  c++  java
  • CFDebug.template

    {
    	"AWSTemplateFormatVersion" : "2010-09-09",
    
    	"Description" : "Create an EC2 instance.",
    
    	"Parameters" : {
    		"KeyName" : {
    			"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance",
    			"Type" : "String",
    			"MinLength" : "1",
    			"MaxLength" : "255",
    			"AllowedPattern" : "[\x20-\x7E]*",
    			"ConstraintDescription" : "can contain only ASCII characters."
    		},
    
    		"SSHFrom" : {
    			"Description" : "Lockdown SSH access (default can be accessed from anywhere)",
    			"Type" : "String",
    			"MinLength" : "9",
    			"MaxLength" : "18",
    			"Default" : "0.0.0.0/0",
    			"AllowedPattern" : "(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2})",
    			"ConstraintDescription" : "must be a valid CIDR range of the form x.x.x.x/x."
    		}
    	},
    
    	"Mappings" : {
    		"AmazonLinuxAMI" : {
    			"us-east-1": {
    			        "AMI": "ami-b66ed3de"
    			      },
    			"us-west-1": {
    			        "AMI": "ami-4b6f650e"
    			      },
    			"us-west-2": {
    			        "AMI": "ami-b5a7ea85"
    			      },
    			"eu-west-1": {
    			        "AMI": "ami-6e7bd919"
    			      },
    			"sa-east-1": {
    			        "AMI": "ami-8737829a"
    			      },
    			"ap-southeast-1": {
    			        "AMI": "ami-ac5c7afe"
    			      },
    			"ap-southeast-2": {
    			        "AMI": "ami-63f79559"
    			      },
    			"ap-northeast-1": {
    			        "AMI": "ami-4985b048"
    			}
    		}
    	},
    
    	"Resources" : {
    		"EC2Instance" : {
    			"Type" : "AWS::EC2::Instance",
    			"Properties" : {
    				"SecurityGroups" : [{
    						"Ref" : "InstanceSecurityGroup"
    					}
    				],
    				"InstanceType" : "t2.micro",
    				"KeyName" : {
    					"Ref" : "KeyName"
    				},
    				
    		"ImageId" : {
          			"Fn::FindInMap" : [
          			"AmazonLinuxAMI", {
              		"Ref" : "AWS::Region"
            		},
            		"AMI"
         			]
        		}
    			}
    		},
    
    		"InstanceSecurityGroup" : {
    			"Type" : "AWS::EC2::SecurityGroup",
    			"Properties" : {
    				"GroupDescription" : "Enable SSH access via port 22",
    				"SecurityGroupIngress" : [{
    						"IpProtocol" : "tcp",
    						"FromPort" : "22",
    						"ToPort" : "22",
    						"CidrIp" : {
    							"Ref" : "SSHFrom"
    						}
    					}
    				]
    			}
    		},
    
    		"MountPoint" : {
    			"Type" : "AWS::EC2::VolumeAttachment",
    			"Properties" : {
    				"InstanceId" : {
    					"Ref" : "EC2Instance"
    				},
    				"VolumeId" : {
    					"Ref" : "NewVolume"
    				},
    				"Device" : "/dev/sdh"
    			}
    		},
    
    		"NewVolume" : {
    			"Type" : "AWS::EC2::Volume",
    			"Properties" : {
    				"Size" : "100",
    				"VolumeType" : "gp2",
    				"AvailabilityZone" : {
    					"Fn::GetAtt" : ["EC2Instance", "AvailabilityZone"]
    				}
    			}
    		}
    	},
    
    	"Outputs" : {
    		"InstanceId" : {
    			"Description" : "InstanceId of the newly created EC2 instance",
    			"Value" : {
    				"Ref" : "EC2Instance"
    			}
    		}
    	}
    }
    

      

  • 相关阅读:
    springboot 上传文件过大的500异常
    java OSS批量下载,并压缩为ZIP
    Java 对象转xml (dom 4j)
    windows 10 64位机器上 安装部署
    Java 读取excel 文件流
    关于Java 去除空格,换行的代码
    ORACLE 查询近一天,近半小时内的数据
    【转】C#(ASP.Net)获取当前路径的方法集合
    【转】NumPy-快速处理数据
    【转】Eclipse 常用快捷键 (动画讲解)
  • 原文地址:https://www.cnblogs.com/oskb/p/5947005.html
Copyright © 2011-2022 走看看