当我通过cloudformation创建beantalk worker时,得到的应用程序版本不存在,无法部署名为

时间:2018-07-10 14:28:48

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

我正在尝试通过云形成来创建beantalk工作者。我已经创建了该应用程序,并且正在尝试为该应用程序创建beantalk环境。 我通过cloudformation创建一个beantalk环境,如下所示:

  EBEnvironment:
Type: AWS::ElasticBeanstalk::Environment
Properties:
  #VersionLabel:
    #Ref: AWS::NoValue
  Description: ""
  EnvironmentName: !Sub ${EnvironmentApp}
  Tier:
    Name: Worker
    Type: SQS/HTTP
    Version: '2.3'
  ApplicationName:
    Fn::ImportValue: !Sub ${project}-${EnvironmentApp}-Beanstalk-appId
  TemplateName: !Ref "EBConfigurationTemplate"

这是我的配置部分:

EBConfigurationTemplate:
Type: AWS::ElasticBeanstalk::ConfigurationTemplate
Properties:
  SolutionStackName: "64bit Amazon Linux 2018.03 v2.7.0 running Python 3.6"
  ApplicationName:
    Fn::ImportValue: !Sub ${project}-${EnvironmentApp}-Beanstalk-appId
  OptionSettings:
  ### -------------------------
  ### Beanstalk Environment Options
  ### -------------------------
  - Namespace: aws:elasticbeanstalk:environment
    OptionName: EnvironmentType
    Value: SingleInstance
  ### -------------------------
  ### Beanstalk HealthReporting Options
  ### -------------------------
  - Namespace: aws:elasticbeanstalk:healthreporting:system
    OptionName: SystemType
    Value: enhanced
  ### -------------------------
  ### Beanstalk Loadbalancer Options
  ### -------------------------
  # We are setting ManagedSecurityGroup and SecurityGroup to the same SG to make Beanstalk work with a
  # custom SG on the Beanstalk LoadBalancer.
  ### -------------------------
  ### Beanstalk CloudWatch Logs Options
  ### -------------------------
  - Namespace: aws:elasticbeanstalk:cloudwatch:logs
    OptionName: StreamLogs
    Value: true
  ### -------------------------
  ### Autoscaling Group
  ### -------------------------
  - Namespace: aws:autoscaling:launchconfiguration
    OptionName: SecurityGroups
    Value:
      Fn::ImportValue: !Sub ${project}-${EnvironmentApp}-sg-cli-Id
  - Namespace: aws:autoscaling:launchconfiguration
    OptionName: IamInstanceProfile
    Value:
      Fn::ImportValue: !Sub ${project}-${EnvironmentApp}-instance-role-daily-digest
  #- Namespace: aws:autoscaling:launchconfiguration
    #OptionName: EC2KeyName
    #Value: !Ref "StackNamePrefixAppBase"
  - Namespace: aws:autoscaling:launchconfiguration
    OptionName: InstanceType
    Value: !Ref InstanceType
  - Namespace: aws:autoscaling:asg
    OptionName: 'MaxSize'
    Value: !Ref MaxEc2s
  - Namespace: aws:autoscaling:updatepolicy:rollingupdate
    OptionName: RollingUpdateEnabled
    Value: 'false'
  ### -------------------------
  ### Beanstalk Worker SQS Queue Options
  ### -------------------------
  - Namespace: aws:elasticbeanstalk:sqsd
    OptionName: HttpConnections
    Value: 50
  - Namespace: aws:elasticbeanstalk:sqsd
    OptionName: VisibilityTimeout
    Value: 300
  - Namespace: aws:elasticbeanstalk:sqsd
    OptionName: InactivityTimeout
    Value: 300
  - Namespace: aws:elasticbeanstalk:sqsd
    OptionName: MaxRetries
    Value: 10
  ### -------------------------
  ### Beanstalk Network VPC Options
  ### -------------------------
  - Namespace: aws:ec2:vpc
    OptionName: ELBSubnets
    Value:
      Fn::ImportValue: !Sub ${BusinessUnit}-${EnvironmentInfra}-vpc-SubnetIdPublic1
  - Namespace: aws:ec2:vpc
    OptionName: Subnets
    Value:
      Fn::ImportValue: !Sub ${BusinessUnit}-${EnvironmentInfra}-vpc-SubnetIdPrivate1
  - Namespace: aws:ec2:vpc
    OptionName: VPCId
    Value:
      Fn::ImportValue: !Sub ${BusinessUnit}-${EnvironmentInfra}-vpc-VpcId
  - Namespace: aws:ec2:vpc
    OptionName: AssociatePublicIpAddress
    Value: false

运行上述命令时,出现以下错误:

    No application version exists to deploy for Application named xxxxxxxx. (Service: AWSElasticBeanstalk; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 53b341aa-a661-4908-99da-5dcd4523d572)

我完全困惑。任何帮助表示赞赏。

0 个答案:

没有答案