aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.11k stars 54 forks source link

AWS::CodeDeploy::BlueGreen - AWS::CodeDeployBlueGreen Transform (CodeDeploy) #821

Open jmurzy opened 3 years ago

jmurzy commented 3 years ago

Following the instructions here. I'm getting the following error when trying to update the task definition with a new image.

Error: Failed to create ChangeSet cdk-deploy-change-set on MyStack: FAILED, Transform AWS::CodeDeployBlueGreen failed with: Failed to transform template. Failed to parse the "Hooks" section for the provided template. Please ensure the AWS::CodeDeploy::BlueGreen Hook matches the expected schema.

Here's the hook

Transform: AWS::CodeDeployBlueGreen
Hooks:
  CodeDeployBlueGreenHook:
    Type: AWS::CodeDeploy::BlueGreen
    Properties:
      ServiceRole: MyRole
      Applications:
        - Target:
            Type: AWS::ECS::Service
            LogicalID: ECSService
          ECSAttributes:
            TaskDefinitions:
              - TaskDefBlue
              - TaskDefGreen
            TaskSets:
              - TaskSetBlue
              - TaskSetGreen
            TrafficRouting:
              ProdTrafficRoute:
                Type: AWS::ElasticLoadBalancingV2::Listener
                LogicalID: LoadBalancer
              TestTrafficRoute:
                Type: AWS::ElasticLoadBalancingV2::Listener
                LogicalID: LoadBalancerTest
              TargetGroups:
                - BlueTg
                - GreenTg
      TrafficRoutingConfig:
        Type: TimeBasedCanary
        TimeBasedCanary:
          StepPercentage: 20
          BakeTimeMins: 15
      AdditionalOptions:
        TerminationWaitTimeInMinutes: 30

Can your team maybe open source the CodeDeployBlueGreen transform so we can do our own debugging? Otherwise, we'll probably need a little more than "Please ensure the AWS::CodeDeploy::BlueGreen Hook matches the expected schema"—especially given this is a CDK generated schema and it passes all other checks.

Thanks!

cc @clareliguori

firstval commented 3 years ago

Does anyone have proper architecture how the AWS::CodeDeploy::BlueGreen works just wondering it does not create any codedeploy as deployment

chezhuo1994 commented 3 years ago

Have you fixed it?

rptld commented 2 years ago

Any news?

chinchalinchin commented 2 years ago

Same error here. Has anyone actually seen this work? What is the configuration that ended up working?

rptld commented 2 years ago

It's stillborn and unusable. Use manual BG deployment (python labmdas) or rolling update.

benbridts commented 2 years ago

@jmurzy Can you share the whole template, or verify that LoadBalancer and LoadBalancerTest are AWS::ElasticLoadBalancingV2::Listeners?

megraby commented 5 months ago

Three years later this seems to still be an ongoing issue. Has anyone found a way round?