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.

posta 2 anni fa7191 visualizzazioni
3 Risposte
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
con risposta 2 anni fa
0

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

profile pictureAWS
ESPERTO
kentrad
con risposta 2 anni fa
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.

con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande