1. 程式人生 > >Pass Multiple Values to a List Parameter Type Using the AWS CLI create

Pass Multiple Values to a List Parameter Type Using the AWS CLI create

{
  "AWSTemplateFormatVersion" : "2010-09-09",

  "Parameters" : { 
   
    "VpcId" : {
      "Type" : "AWS::EC2::VPC::Id",
      "Description" : "VpcId of your existing Virtual Private Cloud (VPC)",
      "ConstraintDescription" : "must be the VPC Id of an existing Virtual Private Cloud."
    },

    "Subnets" : {
      "Type" : "List<AWS::EC2::Subnet::Id>",
      "Description" : "The list of SubnetIds in your Virtual Private Cloud (VPC)",
      "ConstraintDescription" : "must be a list of at least two existing subnets associated with at least two different availability zones. They should be residing in the selected Virtual Private Cloud."
    },

    "InstanceType" : {
      "Description" : "WebServer EC2 instance type",
      "Type" : "String",
      "Default" : "t2.small",
      "AllowedValues" : [ "t2.nano", "t2.micro", "t2.small", "t2.medium", "t2.large"],
      "ConstraintDescription" : "must be a T2 instance type."
    },

    "KeyName" : {
      "Description" : "The EC2 Key Pair to allow SSH access to the instances",
      "Type" : "AWS::EC2::KeyPair::KeyName",
      "ConstraintDescription" : "must be the name of an existing EC2 KeyPair."
    },

    "SSHLocation" : {
      "Description" : "The IP address range that can be used to SSH to the EC2 instances",
      "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 IP CIDR range of the form x.x.x.x/x."
      }
   } ,
  
    "Mappings": {
        "AWSRegionAMIEC2": {
            "ap-northeast-1": {
                "AMZLN": "ami-ceafcba8"
            }, 
            "ap-southeast-1": {
                "AMZLN": "ami-68097514"
            }, 
            "ap-southeast-2": {
                "AMZLN": "ami-942dd1f6"
            }, 
            "eu-central-1": {
                "AMZLN": "ami-5652ce39"
            }, 
            "eu-west-1": {
                "AMZLN": "ami-d834aba1"
            }, 
            "us-east-1": {
                "AMZLN": "ami-97785bed"
            }, 
            "us-west-1": {
                "AMZLN": "ami-824c4ee2"
            }, 
            "us-west-2": {
                "AMZLN": "ami-f2d3638a"
            }
        }
    }, 

  "Resources" : {

    "WebServerGroup" : {
      "Type" : "AWS::AutoScaling::AutoScalingGroup",
      "Properties" : {
        "VPCZoneIdentifier" : { "Ref" : "Subnets" },
        "LaunchConfigurationName" : { "Ref" : "LaunchConfig" },
        "MinSize" : "1",
        "MaxSize" : "3"
      },
      "CreationPolicy" : {
        "ResourceSignal" : {
          "Timeout" : "PT15M",
          "Count"   : "1"
        }
      },

      "UpdatePolicy": {
        "AutoScalingRollingUpdate": {
          "MinInstancesInService": "1",
          "MaxBatchSize": "1",
          "PauseTime" : "PT15M",
          "WaitOnResourceSignals": "true"
        }
      }
    },
    "LaunchConfig" : {
      "Type" : "AWS::AutoScaling::LaunchConfiguration",
    "Metadata" : {
        "Comment" : "Install httpd",
        "AWS::CloudFormation::Init" : {
          "config" : {
            "packages" : {
              "yum" : {
                "httpd" : []
              }
            }
          }
        }
     },
      "Properties" : {
        "KeyName" : { "Ref" : "KeyName" },
         "ImageId": {
                    "Fn::FindInMap": [
                        "AWSRegionAMIEC2", 
                        {
                            "Ref": "AWS::Region"
                        }, 
                        "AMZLN"
                    ]
                }, 
        "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
        "InstanceType" : { "Ref" : "InstanceType" },
        "UserData"       : { "Fn::Base64" : { "Fn::Join" : ["", [
             "#!/bin/bash -xe\n",
             "/opt/aws/bin/cfn-init -v ",
             "         --stack ", { "Ref" : "AWS::StackName" },
             "         --resource LaunchConfig ",
             "         --region ", { "Ref" : "AWS::Region" }, "\n",

             "/opt/aws/bin/cfn-signal -e $? ",
             "         --stack ", { "Ref" : "AWS::StackName" },
             "         --resource WebServerGroup ",
             "         --region ", { "Ref" : "AWS::Region" }, "\n"
        ]]}}
      }
    },
    "InstanceSecurityGroup" : {
      "Type" : "AWS::EC2::SecurityGroup",
      "Properties" : {
        "GroupDescription" : "Enable SSH access ",
        "SecurityGroupIngress" : [ {
          "IpProtocol" : "tcp",
          "FromPort" : "22",
          "ToPort" : "22",
          "CidrIp" : { "Ref" : "SSHLocation"}
        } ],
        "VpcId" : { "Ref" : "VpcId" }
      }
     }
   }
  }

相關推薦

Pass Multiple Values to a List Parameter Type Using the AWS CLI create

{ "AWSTemplateFormatVersion" : "2010-09-09", "Parameters" : { "VpcId" : { "Type" : "AWS::EC2::VPC::Id", "Description"

Create a Virtual Tape Library Using the AWS Storage Gateway

The AWS Storage Gateway connects an on-premises software appliance with cloud-based storage to integrate your on-premises IT environment with the

Create a Simple Resource Record Set in Amazon Route 53 Using the AWS CLI

{ "Comment": "CREATE/DELETE/UPDATE", "Changes": [ { "Action": "CREATE",

"The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value

這句話的意思是將datetime2資料型別轉換為datetime資料型別會導致超出範圍的值。宣告已經終止。 在使用EF插入資料是發生列轉換的錯誤,搞了好久,不知道問題出在哪裡! 根據提示的錯誤資訊來看是Datetime資料型別出現錯誤 後來發現 public Nullable<S

How to replace tape backup with a virtual tape library in the AWS Cloud

Tape media management, media costs, 3rd party offsite contracts and the sheer volume of data growth makes tape backup challenging in any org

Multiple Contexts have a path of "XXXXX". Using CLASSPATH:C:\apache-tomcat-8.0.44\bin\bootstrap.jar”

剛才Tomcat在eclipse下無法啟動了…於是在我的安裝Tomcat目錄下直接startup.bat 依然無法啟動 暫停檢視一下是什麼錯誤? 在eclipse下報錯提示 Multiple Contexts have a path of “XXXXX

Create a Node.js App Using the Express Application Generator Tool

1) Install Express dependencies, create the project directory, and run the generatornpm i -g express express-generatormkdir express-projectcd express-proje

window系統命令列設定proxy----Setting a proxy for Windows using the command-line

  設定代理, bypass-list的引數是不走代理地址: netsh winhttp set proxy proxy-server="socks=localhost:9090" bypass-list="localhost"   檢視當前的代理: netsh winhttp show p

Use the AWS CLI to Call and Store SAML Credentials

{ "SubjectType": "persistent", "AssumedRoleUser": { "AssumedRoleId": "ROLE_ID_NUMBER:[email protected]",

Create a VPC Using the AWS Management Console

Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So

Adding Files to Android's Media Library Using the MediaScanner

When you add files to Android's filesystem these files are not picked up by the MedaScanner automatically. But often

Parameter infoDTOs of type T from private T com.ListVO.setInfoDTOs is not resolvable to a concrete type.

setter com 解決 inter 註釋 getter errors style err WARN org.glassfish.jersey.internal.Errors - The following warnings have been detected: WA

pycharm運行Pytest警告:passing a string to pytest.main() is deprecated, pass a list of arguments instead.

9.png 需要 pass nts nbsp ssi ring 分享 dep 初學pytest. 將pytest寫進Python代碼中 不同運行方式都可正常運行 =======================**********************=

【BUG】java/main中寫入了註解@Test XXX cannot be resolved to a typeMultiple annotations found at this li

由於上次在java/main中寫入了註解@Test,由於後續的解決驢脣不對馬嘴,造成了特大錯誤。報錯也是接二連三,主要的報錯有 1、原來正常匯入com.taotao.pojo中的類不能夠匯入了,顯示以下錯誤,全部都不能用 XXX cannot be resolved to

org.apache.jasper.JasperException: Unable to compile class for JSP: List cannot be resolved to a type 錯誤

org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 163 in the jsp file: /touch/management/pe

XXXcannot be resolved to a type

blog 問題 自動 eclipse class resolved eclips uil can 編寫自動化測試用例一個新創建的用例中類繼承了其他類,由於未知原因,eclipse沒能自動編譯源代碼到build/classes(或其他classes目錄)代碼一直報錯XXX c

XXX cannot be resolved to a type

java tab pan tel req jpeg color form mon 雖然class導入到了jsp, 仍會報錯XXX cannot be resolved to a type 如 BitMatrix cannot be resolved to a type。

Cannot switch on a value of type String for source level below 1.7. Only convertible int values or enum variables are permitted

perm eve mit can source string per ted idt 在java中寫switch代碼時,參數用的是string,jdk用的是1.8,但是還是報錯,說不支持1.7版本以下的,然後查找了項目中的一些文件,打開一個文件如下,發現是1.6的版本,好奇

attempted to return null from a method with a primitive return type (Double).

span att 但是 sele 代碼 mysql from ive star <select id="getMaxHitEventId" parameterType="string" resultType="int"> select max(ap

jsp 頁面 javax.servlet.jsp.JspException cannot be resolved to a type 異常

not pro ima png post version 圖片 exce com <dependencies><dependency><groupId>javax.servlet</groupId><artifactId