Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ec2TagFilters in deployment group for ComputePlatform: Lambda

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

like image 228
VoiceOfUnreason Avatar asked Jan 28 '23 08:01

VoiceOfUnreason


1 Answers

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
like image 196
Josh Asmus Avatar answered Feb 08 '23 15:02

Josh Asmus