copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Stuck on it for 2 days. Path specified in manifest file is not working correctly

Open shain-digix opened this issue 10 months ago • 4 comments

I have a cluster with 3 services. Below are the configuration for service manifest file

  1. Service 1 - api1 environments: dev: http: path: '/' healthcheck: '/api/healthcheck'

  2. Service 2 - api2 environments: dev: http: path: '/' healthcheck: '/healthcheck'

  3. Service 3 - api3 - Newly Added environments: dev: http: path: '/orders-api' healthcheck: '/api/healthcheck'

This is how the HTTP listener for new api3 looks like:

Screenshot at Apr 25 23-47-08

When I enter the url, ALB_URL/orders-api it is not going to the new service api3.

Any idea where did I go wrong?

shain-digix avatar Apr 25 '24 15:04 shain-digix

I think the load balancer rules are exact matches, so you would need a rule forwarding /orders-api in addition to /orders-api/*.

Have you tried setting the http.path to /orders-api/* and then add http.additional_rules.path: '/orders-api'? Not sure if including the wildcard is valid or not in the copilot manifest.

spencer-leopold avatar Apr 25 '24 23:04 spencer-leopold

Looks like copilot should create a rule for /orders-api OR /orders-api/* just by having http.path set to /orders-api. Are you importing a load balancer and your screenshot is a rule you added manually?

spencer-leopold avatar Apr 26 '24 16:04 spencer-leopold

Thanks @spencer-leopold . Solved it

http:
      path: '/orders-api'
      healthcheck: '/orders-api/healthcheck'
      additional_rules:
        path: '/orders-api'

shain-digix avatar May 09 '24 10:05 shain-digix

Solved

shain-digix avatar May 09 '24 10:05 shain-digix

I have a same issue. My config:

http: path: "/share-video-frontend" healthcheck: "/share-video-frontend/healthcheck" additional_rules: path: "/share-video-frontend"

But after i deploy and access to "url/share-video-frontend". Throw error "503 Service Temporarily Unavailable". Can you know what I did wrong?

nhathoang241199 avatar Sep 01 '24 16:09 nhathoang241199

Hello @nhathoang241199 can you check if

  1. /share-video-frontend is handled in your application
  2. when you go to the ALB console, do you see /share-video-frontend added correctly as a listener rule?

iamhopaul123 avatar Sep 03 '24 16:09 iamhopaul123