I have web services running on Elastic Beanstalk. I am trying to add SNS to it for mobile push notification. I have successfully tested it from AWS console.
I instantiated AmazonSNSClient and it is not null. However any method call such as listEndpointsByPlatformApplication, createPlatformEndpoint, publish etc. appears to be stuck. These calls never returns and does not throwing any exception.
I have given full SNS permission to the service role.
BasicAWSCredentials creds = new BasicAWSCredentials(AWS_ACCESS_KEY_ID, AWS_SECRET_KEY);
AmazonSNSClient snsClient = new AmazonSNSClient(creds).withRegion(Region.getRegion(Regions.US_EAST_1));
Any help is greatly appreciated.