【问题标题】:AWS CloudFormation: Unable to attach the security groups to the instances of ElasticBeanstalkAWS CloudFormation:无法将安全组附加到 ElasticBeanstalk 的实例
【发布时间】:2020-12-06 21:16:15
【问题描述】:

我正在使用 CloudFormation 将我的 Laravel 应用程序部署到 AWS。我创建了一个 ElasticBeanstalk 环境并将我的应用程序部署到其中。但是当我尝试将安全组附加到实例时,它失败了。

这是我的模板。

AWSTemplateFormatVersion: '2010-09-09'
Description: "Pathein Directory web application deployment template."
Parameters:
  KeyName:
    Default: 'PatheinDirectory'
    Type: String
  InstanceType:
    Default: 't2.micro'
    Type: String
  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
  Vpc:
    Default: "vpc-dd53ada4"
    Type: String
  VpcCidr:
    Default: "172.31.0.0/16"
    Type: String
Mappings:
  Region2Principal:
    us-east-1:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    us-west-2:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    us-west-1:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    eu-west-1:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    eu-west-2:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    eu-west-3:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    ap-southeast-1:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    ap-northeast-1:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    ap-northeast-2:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    ap-northeast-3:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    ap-southeast-2:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    ap-south-1:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    us-east-2:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    ca-central-1:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    sa-east-1:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    cn-north-1:
      EC2Principal: ec2.amazonaws.com.cn
      OpsWorksPrincipal: opsworks.amazonaws.com.cn
    cn-northwest-1:
      EC2Principal: ec2.amazonaws.com.cn
      OpsWorksPrincipal: opsworks.amazonaws.com.cn
    eu-central-1:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
    eu-north-1:
      EC2Principal: ec2.amazonaws.com
      OpsWorksPrincipal: opsworks.amazonaws.com
Resources:
  WebServerSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: Security Group for EC2 instances
      SecurityGroupIngress:
        - IpProtocol: tcp
          FromPort: '80'
          ToPort: '80'
          CidrIp: 0.0.0.0/0
        - IpProtocol: tcp
          FromPort: '22'
          ToPort: '22'
          CidrIp:
            Ref: SSHLocation
      VpcId: !Ref Vpc
  WebServerRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - Fn::FindInMap:
                    - Region2Principal
                    - Ref: AWS::Region
                    - EC2Principal
            Action:
              - sts:AssumeRole
      Path: /
  WebServerRolePolicy:
    Type: AWS::IAM::Policy
    Properties:
      PolicyName: WebServerRole
      PolicyDocument:
        Statement:
          - Effect: Allow
            NotAction: iam:*
            Resource: '*'
      Roles:
        - Ref: WebServerRole
  WebServerInstanceProfile:
    Type: AWS::IAM::InstanceProfile
    Properties:
      Path: /
      Roles:
        - Ref: WebServerRole
  Application:
    Type: AWS::ElasticBeanstalk::Application
    Properties:
      Description: AWS Elastic Beanstalk Pathein Directory Laravel application
  ApplicationVersion:
    Type: AWS::ElasticBeanstalk::ApplicationVersion
    Properties:
      Description: Version 1.0
      ApplicationName:
        Ref: Application
      SourceBundle:
        S3Bucket:
          Fn::Join:
            - '-'
            - - elasticbeanstalk-samples
              - Ref: AWS::Region
        S3Key: php-sample.zip
  ApplicationConfigurationTemplate:
    Type: AWS::ElasticBeanstalk::ConfigurationTemplate
    Properties:
      ApplicationName:
        Ref: Application
      Description: SSH access to Pathein Directory Laravel application
      SolutionStackName: 64bit Amazon Linux 2018.03 v2.9.8 running PHP 7.2
      OptionSettings:
        - Namespace: aws:autoscaling:launchconfiguration
          OptionName: EC2KeyName
          Value:
            Ref: KeyName
        - Namespace: aws:autoscaling:launchconfiguration
          OptionName: IamInstanceProfile
          Value:
            Ref: WebServerInstanceProfile
        - Namespace: aws:autoscaling:launchconfiguration
          OptionName: SecurityGroups
          Value:
            Ref: WebServerSecurityGroup
  Environment:
    Type: AWS::ElasticBeanstalk::Environment
    Properties:
      Description: AWS Elastic Beanstalk Environment running Pathein Directory Laravel application
      ApplicationName:
        Ref: Application
      EnvironmentName: PatheinDirectoryTesting
      TemplateName:
        Ref: ApplicationConfigurationTemplate
      VersionLabel:
        Ref: ApplicationVersion
      OptionSettings:
        - Namespace: aws:elasticbeanstalk:environment
          OptionName: EnvironmentType
          Value: SingleInstance

如您所见,我的模板中有一个 WebServerSecurityGroup 资源,我将其附加到 Beanstalk 资源,如下所示。

- Namespace: aws:autoscaling:launchconfiguration
              OptionName: SecurityGroups
              Value:
                Ref: WebServerSecurityGroup

当我部署它时,它失败了。但是如果我不附加安全组,部署是成功的。我的代码有什么问题,我该如何解决?

这是日志中的错误。

{
            "StackId": "arn:aws:cloudformation:eu-west-1:733553390213:stack/patheindirectory/2279aec0-e0af-11ea-9638-0239f54378b8",
            "EventId": "0f5cb020-e0b0-11ea-9e62-06135fdfc858",
            "StackName": "patheindirectory",
            "LogicalResourceId": "patheindirectory",
            "PhysicalResourceId": "arn:aws:cloudformation:eu-west-1:733553390213:stack/patheindirectory/2279aec0-e0af-11ea-9638-0239f54378b8",
            "ResourceType": "AWS::CloudFormation::Stack",
            "Timestamp": "2020-08-17T17:35:36.459000+00:00",
            "ResourceStatus": "UPDATE_ROLLBACK_IN_PROGRESS",
            "ResourceStatusReason": "The following resource(s) failed to update: [ApplicationConfigurationTemplate]. "
        },
        {
            "StackId": "arn:aws:cloudformation:eu-west-1:733553390213:stack/patheindirectory/2279aec0-e0af-11ea-9638-0239f54378b8",
            "EventId": "ApplicationConfigurationTemplate-UPDATE_FAILED-2020-08-17T17:35:35.723Z",
            "StackName": "patheindirectory",
            "LogicalResourceId": "ApplicationConfigurationTemplate",
            "PhysicalResourceId": "pathe-Appli-YX7VOE30J9B5",
            "ResourceType": "AWS::ElasticBeanstalk::ConfigurationTemplate",
            "Timestamp": "2020-08-17T17:35:35.723000+00:00",
            "ResourceStatus": "UPDATE_FAILED",
            "ResourceStatusReason": "Configuration validation exception: Invalid option value: 'sg-0a306c1333b9bf33e' (Namespace: 'aws:autoscaling:launchconfiguration', OptionName: 'SecurityGroups'): The security group 'sg-0a306c133
3b9bf33e' does not exist (Service: AWSElasticBeanstalk; Status Code: 400; Error Code: ConfigurationValidationException; Request ID: 955a0f72-5f26-4ede-a494-e748897b4c93)",
            "ResourceProperties": "{\"ApplicationName\":\"patheindirectory-Application-1H2ZF7KLXDN5P\",\"Description\":\"SSH access to Pathein Directory Laravel application\",\"OptionSettings\":[{\"Value\":\"PatheinDirectory\",\"Nam
espace\":\"aws:autoscaling:launchconfiguration\",\"OptionName\":\"EC2KeyName\"},{\"Value\":\"patheindirectory-WebServerInstanceProfile-1F7RC2LIQP996\",\"Namespace\":\"aws:autoscaling:launchconfiguration\",\"OptionName\":\"IamInstanc
eProfile\"},{\"Value\":\"sg-0a306c1333b9bf33e\",\"Namespace\":\"aws:autoscaling:launchconfiguration\",\"OptionName\":\"SecurityGroups\"}],\"SolutionStackName\":\"64bit Amazon Linux 2018.03 v2.9.8 running PHP 7.2\"}"
        },

【问题讨论】:

    标签: amazon-web-services amazon-elastic-beanstalk amazon-cloudformation


    【解决方案1】:

    找不到WebServerSecurityGroup (SG) 的原因是因为您在与您的EB 环境不同的VPC 中创建SG。具体来说,您在默认 VPC 中使用 EB,而您似乎是在不同的 VPC 中创建 SG,如下行所示:

          VpcId: !Ref Vpc # <--- your EB will be in different VPC than your SG
    

    由于不清楚您在使用 VPC 做什么(您是在自定义 VPC 中启动 EB、创建新 VPC 还是使用默认 VPC?),所以对您的模板最简单的修复就是删除 VpcId: !Ref Vpc

    另外,您的平台版本已过时,需要更改。可用的 PHP 平台版本列表是here

    修复了模板,我可以在us-east-1验证它是否有效。它在default VPC 中启动了 EB 及其 SG。对于自定义 VPC,您的模板需要进行更多更改,例如子网定义、路由表以及对 EB 环境本身的 VPC 特定更改。

    AWSTemplateFormatVersion: '2010-09-09'
    Description: "Pathein Directory web application deployment template."
    Parameters:
      KeyName:
        Default: 'PatheinDirectory'
        Type: String
      InstanceType:
        Default: 't2.micro'
        Type: String
      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
      # Vpc:
      #   Default: "vpc-dd53ada4"
      #   Type: String
      # VpcCidr:
      #   Default: "172.31.0.0/16"
      #   Type: String
    
    Mappings:
      Region2Principal:
        us-east-1:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        us-west-2:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        us-west-1:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        eu-west-1:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        eu-west-2:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        eu-west-3:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        ap-southeast-1:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        ap-northeast-1:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        ap-northeast-2:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        ap-northeast-3:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        ap-southeast-2:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        ap-south-1:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        us-east-2:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        ca-central-1:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        sa-east-1:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        cn-north-1:
          EC2Principal: ec2.amazonaws.com.cn
          OpsWorksPrincipal: opsworks.amazonaws.com.cn
        cn-northwest-1:
          EC2Principal: ec2.amazonaws.com.cn
          OpsWorksPrincipal: opsworks.amazonaws.com.cn
        eu-central-1:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
        eu-north-1:
          EC2Principal: ec2.amazonaws.com
          OpsWorksPrincipal: opsworks.amazonaws.com
    Resources:
    
      WebServerSecurityGroup:
        Type: AWS::EC2::SecurityGroup
        Properties:
          GroupDescription: Security Group for EC2 instances
          SecurityGroupIngress:
            - IpProtocol: tcp
              FromPort: '80'
              ToPort: '80'
              CidrIp: 0.0.0.0/0
            - IpProtocol: tcp
              FromPort: '22'
              ToPort: '22'
              CidrIp:
                Ref: SSHLocation
          #VpcId: !Ref Vpc
    
      WebServerRole:
        Type: AWS::IAM::Role
        Properties:
          AssumeRolePolicyDocument:
            Statement:
              - Effect: Allow
                Principal:
                  Service:
                    - Fn::FindInMap:
                        - Region2Principal
                        - Ref: AWS::Region
                        - EC2Principal
                Action:
                  - sts:AssumeRole
          Path: /
      WebServerRolePolicy:
        Type: AWS::IAM::Policy
        Properties:
          PolicyName: WebServerRole
          PolicyDocument:
            Statement:
              - Effect: Allow
                NotAction: iam:*
                Resource: '*'
          Roles:
            - Ref: WebServerRole
    
      WebServerInstanceProfile:
        Type: AWS::IAM::InstanceProfile
        Properties:
          Path: /
          Roles:
            - Ref: WebServerRole
      Application:
        Type: AWS::ElasticBeanstalk::Application
        Properties:
          Description: AWS Elastic Beanstalk Pathein Directory Laravel application
      ApplicationVersion:
        Type: AWS::ElasticBeanstalk::ApplicationVersion
        Properties:
          Description: Version 1.0
          ApplicationName:
            Ref: Application
          SourceBundle:
            S3Bucket:
              Fn::Join:
                - '-'
                - - elasticbeanstalk-samples
                  - Ref: AWS::Region
            S3Key: php-sample.zip
    
      ApplicationConfigurationTemplate:
        Type: AWS::ElasticBeanstalk::ConfigurationTemplate
        Properties:
          ApplicationName:
            Ref: Application
          Description: SSH access to Pathein Directory Laravel application
          SolutionStackName: 64bit Amazon Linux 2018.03 v2.9.9 running PHP 7.2 
          OptionSettings:
            - Namespace: aws:autoscaling:launchconfiguration
              OptionName: EC2KeyName
              Value:
                Ref: KeyName
            - Namespace: aws:autoscaling:launchconfiguration
              OptionName: IamInstanceProfile
              Value:
                Ref: WebServerInstanceProfile
            - Namespace: aws:autoscaling:launchconfiguration
              OptionName: SecurityGroups
              Value:
                Ref: WebServerSecurityGroup
    
      Environment:
        Type: AWS::ElasticBeanstalk::Environment
        Properties:
          Description: AWS Elastic Beanstalk Environment running Pathein Directory Laravel application
          ApplicationName:
            Ref: Application
          EnvironmentName: PatheinDirectoryTesting
          TemplateName:
            Ref: ApplicationConfigurationTemplate
          VersionLabel:
            Ref: ApplicationVersion
          OptionSettings:
            - Namespace: aws:elasticbeanstalk:environment
              OptionName: EnvironmentType
              Value: SingleInstance
    

    【讨论】:

      【解决方案2】:

      查看example template 后,似乎配置需要VpcIdSubnetsELBSubnets 选项以允许EB 设置加入VPC,而不是创建自己的。

      此外,您使用的是以前版本的SolutionStackName,它应该是64bit Amazon Linux 2018.03 v2.9.9 running PHP 7.2

      我还注意到您的好处是可以将AWS parameters 用于 VPC Id 和密钥名称,而不是硬编码,这将提高界面的可用性。

      下面的模板修复了上面的问题

      AWSTemplateFormatVersion: '2010-09-09'
      Description: "Pathein Directory web application deployment template."
      Parameters:
        KeyName:
          Type: AWS::EC2::KeyPair::KeyName
        InstanceType:
          Default: 't2.micro'
          Type: String
        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
        Subnet:
          Type: AWS::EC2::Subnet::Id
        Vpc:
          Type: AWS::EC2::VPC::Id
        VpcCidr:
          Default: "172.31.0.0/16"
          Type: String
      Mappings:
        Region2Principal:
          us-east-1:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          us-west-2:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          us-west-1:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          eu-west-1:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          eu-west-2:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          eu-west-3:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          ap-southeast-1:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          ap-northeast-1:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          ap-northeast-2:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          ap-northeast-3:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          ap-southeast-2:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          ap-south-1:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          us-east-2:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          ca-central-1:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          sa-east-1:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          cn-north-1:
            EC2Principal: ec2.amazonaws.com.cn
            OpsWorksPrincipal: opsworks.amazonaws.com.cn
          cn-northwest-1:
            EC2Principal: ec2.amazonaws.com.cn
            OpsWorksPrincipal: opsworks.amazonaws.com.cn
          eu-central-1:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
          eu-north-1:
            EC2Principal: ec2.amazonaws.com
            OpsWorksPrincipal: opsworks.amazonaws.com
      Resources:
        WebServerSecurityGroup:
          Type: AWS::EC2::SecurityGroup
          Properties:
            GroupDescription: Security Group for EC2 instances
            SecurityGroupIngress:
              - IpProtocol: tcp
                FromPort: '80'
                ToPort: '80'
                CidrIp: 0.0.0.0/0
              - IpProtocol: tcp
                FromPort: '22'
                ToPort: '22'
                CidrIp:
                  Ref: SSHLocation
            VpcId: !Ref Vpc
        WebServerRole:
          Type: AWS::IAM::Role
          Properties:
            AssumeRolePolicyDocument:
              Statement:
                - Effect: Allow
                  Principal:
                    Service:
                      - Fn::FindInMap:
                          - Region2Principal
                          - Ref: AWS::Region
                          - EC2Principal
                  Action:
                    - sts:AssumeRole
            Path: /
        WebServerRolePolicy:
          Type: AWS::IAM::Policy
          Properties:
            PolicyName: WebServerRole
            PolicyDocument:
              Statement:
                - Effect: Allow
                  NotAction: iam:*
                  Resource: '*'
            Roles:
              - Ref: WebServerRole
        WebServerInstanceProfile:
          Type: AWS::IAM::InstanceProfile
          Properties:
            Path: /
            Roles:
              - Ref: WebServerRole
        Application:
          Type: AWS::ElasticBeanstalk::Application
          Properties:
            Description: AWS Elastic Beanstalk Pathein Directory Laravel application
        ApplicationVersion:
          Type: AWS::ElasticBeanstalk::ApplicationVersion
          Properties:
            Description: Version 1.0
            ApplicationName:
              Ref: Application
            SourceBundle:
              S3Bucket:
                Fn::Join:
                  - '-'
                  - - elasticbeanstalk-samples
                    - Ref: AWS::Region
              S3Key: php-sample.zip
        ApplicationConfigurationTemplate:
          Type: AWS::ElasticBeanstalk::ConfigurationTemplate
          Properties:
            ApplicationName:
              Ref: Application
            Description: SSH access to Pathein Directory Laravel application
            SolutionStackName: 64bit Amazon Linux 2018.03 v2.9.9 running PHP 7.2
            OptionSettings:
              - Namespace: aws:autoscaling:launchconfiguration
                OptionName: EC2KeyName
                Value:
                  Ref: KeyName
              - Namespace: aws:autoscaling:launchconfiguration
                OptionName: IamInstanceProfile
                Value:
                  Ref: WebServerInstanceProfile       
              - Namespace: aws:ec2:vpc
                OptionName: VPCId
                Value:
                  Ref: Vpc
              - Namespace: aws:ec2:vpc
                OptionName: ELBSubnets
                Value:
                  Ref: Subnet
              - Namespace: aws:ec2:vpc
                OptionName: Subnets
                Value:
                  Ref: Subnet
              - Namespace: aws:autoscaling:launchconfiguration
                OptionName: SecurityGroups
                Value: 
                  Ref: WebServerSecurityGroup
        Environment:
          Type: AWS::ElasticBeanstalk::Environment
          Properties:
            Description: AWS Elastic Beanstalk Environment running Pathein Directory Laravel application
            ApplicationName:
              Ref: Application
            EnvironmentName: PatheinDirectoryTesting
            TemplateName:
              Ref: ApplicationConfigurationTemplate
            VersionLabel:
              Ref: ApplicationVersion
            OptionSettings:
              - Namespace: aws:elasticbeanstalk:environment
                OptionName: EnvironmentType
                Value: SingleInstance
      

      【讨论】:

      • 您遇到什么错误?它使用它为我正确构建。
      猜你喜欢
      • 2020-08-25
      • 2021-07-13
      • 1970-01-01
      • 2018-03-05
      • 2021-11-30
      • 2016-01-23
      • 2020-12-20
      • 2017-12-05
      • 1970-01-01
      相关资源
      最近更新 更多