Connection refused when connecting from aws eks

I’m testing with alpaca-java to develop my trading-application.
When I was testing in my local computer, it works
But in aws environment, it doesn’t work with connection refused.
Is there any blocking rule or ip-address range?

Is it simply an AWS EC2 instance? Can you confirm your AWS environment has an internet connection with the ping or curl command? Can you post the stacktrace/error/debug log from your application? To see the logs on standard output, follow this guide here.