awslabs / fargatecli

CLI for AWS Fargate
Apache License 2.0
894 stars 115 forks source link

Create lb with http and https #104

Open juliangruber opened 4 years ago

juliangruber commented 4 years ago

Thank you for this CLI!

I'm trying to create a load balancer that forwards both HTTP and HTTPS, with a certificate, and am getting this error:

$ fargate lb create NAME --port 80 --port 443 --certificate DOMAIN --region eu-west-1
 ⚠️  Could not create listener
    - ValidationError: A certificate cannot be specified for HTTP listeners
    status code: 400, request id: e913f856-4580-4dcf-bb9e-09ef791e2957

What am I doing wrong?

juliangruber commented 4 years ago

For now I'm just creating the HTTPS listener with the CLI and adding the HTTP listener manually afterwards I manually added a second listener which redirects HTTP to HTTPS