Managing Compute endpoint on multiple ec2 instances

Hi,

I trying to solve scaling problem. Here is a case.

  1. I have my GH script that needs good computation and it takes time to generate output. Considering this we launching new instance per request.
  2. Now I made my custom endpoint and register it using HostUtils.RegisterEndpoint which calls my GH script whenever it is called.
  3. This workflow is working as per expectation one ec2 machine. Now for scaling and creating ec2 for each request I created an image of this instance(AMI) and using this custom AMI to launch new instances.
  4. now the Problem is on new instances my customendpoint is not working. other apis like /sdk ,/healthcheck are working fine but my customendpoint is not working. here is one setup I made on the orignal machine that I created and it is working there


now my question is am I missing something here ?