Ec2TagFilters in deployment group for ComputePlatf

2019-07-15 06:40发布

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条回答
Lonely孤独者°
2楼-- · 2019-07-15 07:37

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
查看更多
登录 后发表回答