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.

gefragt vor 2 Jahren7192 Aufrufe
3 Antworten
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
beantwortet vor 2 Jahren
0

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

profile pictureAWS
EXPERTE
kentrad
beantwortet vor 2 Jahren
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.

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen