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.

asked 2 years ago7104 views
3 Answers
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
answered 2 years ago
0

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

profile pictureAWS
EXPERT
kentrad
answered 2 years ago
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.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions