Changing the Web Service Port

Changing the Web Service Port

For new Web services, we use port 3000 as the default port for the container.

You may choose a different port within the standard range when you create the service.

This port configuration is used in multiple services on AWS side, in order to get the complete end to end integration working.

However, due to an AWS limitation, you can not change the port for the service after it has been created.

If you tried to change the service port in subsequent deployments, the deployment will fail with an error message directing you to this section in the documentation.

Restoring your Service Deployment

You have three options in order to restore your service deployments:

  1. The easiest is to restore the port to the current existing port that was used during the service creation (by default 3000 if you did not specify one).
  2. If your service is not handling production traffic then you can:
    • Go to the Flightcontrol dashboard, and delete the service
    • Trigger a new deployment which will create another service from scratch now with the new defined port.
  3. If your app is handling production traffic, follow those steps:
    • Rename your service id to a different id in your flightcontrol.json file
      • Make sure to rename the service id if you used that id in any dependency or in any environment variables
    • Push another deployment, which will create a different service, using the new port
    • Make any arrangement to your domain to route the traffic to the new service.
    • Delete the old service from the Flightcontrol dashboard once it is no longer needed or required.