0

如何創建一個ElasticBeanstalk environment不帶負載均衡?我沒有任何選擇在aws:autoscaling:launchconfiguration禁用它。Cloudformation:無負載均衡創建ElasticBeanstalk

這是可能的turn off load balancing manually從AWS管理控制檯。

這是我Cloudformation堆棧模板:

WsServerEBApp: 
    Type: "AWS::ElasticBeanstalk::Application" 
    Properties: 
     ApplicationName: WS Server 
     Description: App for Websocket Server that will hold EB Environments 

    WsServerEBEnvironemt: 
     Type: 'AWS::ElasticBeanstalk::Environment' 
     Properties: 
     EnvironmentName: staging 
     ApplicationName: !Ref WsServerEBApp 
     CNAMEPrefix: staging 
     SolutionStackName: 64bit Amazon Linux 2017.03 v2.7.3 running Docker 17.03.1-ce 
     VersionLabel: !Ref WsServerEBAppVersion 
     OptionSettings: 
      - Namespace: 'aws:autoscaling:launchconfiguration' 
      OptionName: EC2KeyName 
      Value: !Ref KeyName 
      - Namespace: 'aws:autoscaling:launchconfiguration' 
      OptionName: IamInstanceProfile 
      Value: aws-elasticbeanstalk-ec2-role 
      - Namespace: 'aws:autoscaling:launchconfiguration' 
      OptionName: SecurityGroups 
      Value: 
       - launch-wizard-1 

    WsServerEBAppVersion: 
    Type: 'AWS::ElasticBeanstalk::ApplicationVersion' 
    Properties: 
     ApplicationName: !Ref WsServerEBApp 

回答

1

我把它用做EnvironmentTypeSingleInstance

WsServerEBEnvironemt: 
     Type: 'AWS::ElasticBeanstalk::Environment' 
     Properties: 
     .... 
     OptionSettings: 
      .... 
      - Namespace: aws:elasticbeanstalk:environment 
        OptionName: EnvironmentType 
        Value: SingleInstance