Ec2TagFilters in deployment group for ComputePlatform: Lambda

无人久伴 提交于 2019-12-24 00:56:05

问题


I'm trying to work my way through a Cloud Formation stack creation. The stack includes an AWS::CodeDeploy::Application using CodePlatform: Lambda. It also has an AWS::CodeDeploy::DeploymentGroup.

If I run create-stack without the deployment group present, everything seems to work. I can then go into the web UI, and add the deployment group by hand.

But if I describe the deployment group in the template, and run create-stack, the create of the deployment group fails, and the stack gets rolled back. The error message looks like:

For Lambda deployment group, ec2TagFilters can not be specified (Service: AmazonCodeDeploy; Status Code: 400; Error Code: InvalidEC2TagException; Request ID: c4347652-c755-11e8-b8f1-6f54b77ae7fe)

... but my template's description of the deployment group doesn't include Ec2TagFilters


回答1:


Ran into the same thing. No reference to the parameter, still errors. Added a Null Ec2TagFilters parameter and no luck. Weirdly, I then added a Deployment Style parameter, tried again, and it succeeded. Here's the CFN I ended with:

TestSSHConnectivityCodeDeployGroup:
    Type: AWS::CodeDeploy::DeploymentGroup
    Condition: InPrimaryRegion
    Properties:
        ApplicationName: !Ref TestSSHConnectivityCodeDeployApplication
        DeploymentGroupName: Lambda-TestSSHConnectivity
        DeploymentConfigName: CodeDeployDefault.LambdaAllAtOnce
        DeploymentStyle:
            DeploymentOption: WITH_TRAFFIC_CONTROL
            DeploymentType: BLUE_GREEN
        ServiceRoleArn: !Sub arn:aws:iam::${AWS::AccountId}:role/AWS-CodeDeploy-Service


来源:https://stackoverflow.com/questions/52636182/ec2tagfilters-in-deployment-group-for-computeplatform-lambda

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!