How to troubleshoot Cloudformation "Invalid request provided: AWS::ElasticLoadBalancingV2::ListenerRule Validation exception"?

0

My Cloudformation Template is running into this Error when trying to create a ListenerRule.:

Resource handler returned message: "Invalid request provided: AWS::ElasticLoadBalancingV2::ListenerRule Validation exception" (RequestToken: d24b7617-9302-cf2e-f24c-78293248ea26, HandlerErrorCode: InvalidRequest)

the ListenerRule is straight Forward (AllocateAlbRulePriorityCustomResource.Priority returns a number between 1-50000):

ListenerRule:
    Type: AWS::ElasticLoadBalancingV2::ListenerRule
    Properties:
      Actions:
        - Type: forward
          TargetGroupArn: !Ref TargetGroup
      Conditions:
        - Field: host-header
          Values:
            - !Ref AppUrl
      ListenerArn: !Ref ListenerArn
      Priority: !GetAtt AllocateAlbRulePriorityCustomResource.Priority

how can i further troubleshoot and find out why exactly the ListenerRule is failing to be created?

  • I got this error and retrying the same request succeeded. Any idea why that would happen? The retry was automatically handed by deployment scripts, I don't think there is any further record of the failed attempt to investigate.

已提问 2 年前7199 查看次数
3 回答
0

You would want to use Cloudformation's ability to disable rollback which keeps items that are successfully deployed instead of destroying all new resources. This allows you to investigate them and query the logs.

AWS
已回答 2 年前
0

AWS CloudFormation Linter can help. Sometimes validate-template will also help.

profile pictureAWS
专家
kentrad
已回答 2 年前
0

That error is often the result of a permissions issue, where the user or role creating the ListenerRule is not authorized to perform the elasticloadbalancing:CreateRule action on the ListenerRule being created.

Please refer to this thread: https://github.com/aws/aws-cdk/issues/12327#issuecomment-1149336304.

已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则