Android and Amazon EC2 Interlink Issues

Viewed 58

I am trying to link Android with EC2 and RDS services. It is currently experiencing problems with its connection with the EC2 server on Android. I'll show you my code and error below, so if you know what the problem is, please answer me.

MY CODE

public class RetrofitClient
{
        private final static String BASE_URL = "https://ec2-MYIP.us-east-2.compute.amazonaws.com/";
        private static Retrofit retrofit = null;

        private RetrofitClient() {
        }

        public static Retrofit getClient() {
            if (retrofit == null) {
                retrofit = new Retrofit.Builder()
                        .baseUrl(BASE_URL) .
                        .addConverterFactory(GsonConverterFactory.create()) .
                        .build();
            }

            return retrofit;
        }
}

ERROR

E/: failed to connect to ec2-MYIP.us-east-2.compute.amazonaws.com/MYIP (port 443) from /MYIP (port 58092) after 10000ms

0 Answers
Related