farwardtotargetgroup:
Type: AWS::ElasticLoadBalancingV2::Listener
Properties:
Certificates:
- CertificateArn: !Ref cert
DefaultActions:
- TargetGroupArn: !Ref target-group
Type: forward
LoadBalancerArn: !Ref nlb
Port: 443
Protocol: TLS
redirectto443:
Type: AWS::ElasticLoadBalancingV2::Listener
Properties:
DefaultActions:
- RedirectConfig:
Port: 443
StatusCode: HTTP_301
Type: redirect
LoadBalancerArn: !Ref nlb
Port: 80
Protocol: TLS
当我执行模板时,我得到了
The action type 'redirect' is not valid with network load balancer (Service: AmazonElasticLoadBalancingV2; Status Code: 400;错误代码:InvalidLoadBalancerAction;。InvalidLoadBalancerAction。