CDK Deployment fails CloudFormation Tag validation hook
08:37 25 Mar 2026

We have activated the CloudFormation Tag validation hook

aws --region us-west-2 cloudformation activate-type \
  --type HOOK \
  --type-name AWS::TagPolicies::TaggingComplianceValidator \
  --publisher-id aws-hooks \
  --auto-update \
  --execution-role-arn 


 aws --region us-west-2 cloudformation set-type-configuration \
    --type HOOK \
    --type-name AWS::TagPolicies::TaggingComplianceValidator \
    --configuration '{
      "CloudFormationConfiguration": {
        "HookConfiguration": {                                                                      
          "HookInvocationStatus": "ENABLED",
          "FailureMode": "FAIL",
          "TargetOperations": ["STACK"],
          "Properties": {}
        }
      }
    }'

along with a Tag policy to report missing required tags.

The hook works as expected if a stack is deployed via aws cloudformation create-stack cli command. Example of the hook running in WARN mode:

enter image description here

But if the stack is deployed via cdk deploy command - hook always fails with "Invalid cloudformation template format error." Example of the hook running in WARN mode:

enter image description here

Any idea what is going on, or any fix/workaround for this issue? We do need to continue using cdk cli for deployment.

aws-cloudformation hook aws-cdk