Amazon web services ElasticBeanstalk员工环境陷入困境;正在等待EC2实例启动。这可能需要几分钟。”;然后超时

Amazon web services ElasticBeanstalk员工环境陷入困境;正在等待EC2实例启动。这可能需要几分钟。”;然后超时,amazon-web-services,amazon-elastic-beanstalk,Amazon Web Services,Amazon Elastic Beanstalk,我正在通过云形成模板定义电子商务工作者环境: EbWorkerApplication: Type: 'AWS::ElasticBeanstalk::Application' Properties: ApplicationName: !Sub "${AWS::StackName}-worker" Description: !Ref DeploymentDescription EbWorkerEnvironment:

我正在通过云形成模板定义电子商务工作者环境:

  EbWorkerApplication:
    Type: 'AWS::ElasticBeanstalk::Application'
    Properties:
      ApplicationName: !Sub "${AWS::StackName}-worker"
      Description: !Ref DeploymentDescription
    
  EbWorkerEnvironment:
    Type: 'AWS::ElasticBeanstalk::Environment'
    DependsOn: EbWorkerApplication
    Properties:
      Tier:
        Name: "Worker"
        Type: "SQS/HTTP"
      ApplicationName: !Ref EbWorkerApplication
      EnvironmentName: !Sub "${EnvName}-worker"
      SolutionStackName: !Ref SolutionStackName
      OptionSettings:
        - Namespace: 'aws:autoscaling:launchconfiguration'
          OptionName: SecurityGroups
          Value:
            Fn::ImportValue:
              !Sub "${EnvName}-app-sg"
        - Namespace: 'aws:autoscaling:launchconfiguration'
          OptionName: IamInstanceProfile
          Value: "aws-elasticbeanstalk-ec2-role"
        - Namespace: 'aws:elasticbeanstalk:environment'
          OptionName: ServiceRole
          Value: !Ref EbServiceRole

          ... plus remaining stuff not relevant ...
我有一个类似的Web服务器环境

然而,上面的工人环境并没有出现。这就是错误:

2:58am Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.     
12:57am Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].     
12:57am [Instance: i-0214d84820a734097] Command failed on instance. Return code: 1 Output: Engine execution has encountered an error..     
12:56am Instance deployment failed. For details, see 'eb-engine.log'.   
12:55am Waiting for EC2 instances to launch. This may take a few minutes.

什么原因会导致这种情况?

通过在子网定义中设置显式的
MapPublicIpOnLaunch:true
(问题中显示的代码之外)解决了此特定问题


我现在有了一个。

如果您有类似的EB-env,那么它可以工作,有什么区别?新的是自定义VPC吗?工作的类似环境是Web服务器,失败的是工作环境