I am running a Spring Boot application and using Spring boot cassandra to connect to keyspace. Following are the properties being used:
spring.data.cassandra.contact-points=cassandra.us-east-2.amazonaws.com
spring.data.cassandra.port=9142
spring.data.cassandra.ssl=true
I am passing cassandra truststore key as vm argument. From my local dev environment it works perfectly fine without any issue.
When I created a docker image with exactly same cassandra configuration and deployed it in AWS cloud (using ECS) it fails every time with following exception Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: cassandra.us-east-2.amazonaws.com/3.12.23.159:9142 (com.datastax.driver.core.exceptions.TransportException: cassandra.us-east-2.amazonaws.com/3.12.23.159:9142 Cannot connect)-
Here also I am passing trustore key as vm argument and verified certificate as well by enabling log. Can some one please help me with this issue.
Use the following container as a reference on how to setup a container
https://github.com/aws-samples/amazon-keyspaces-toolkit
For Java apps you may need to add the pem to the truststore with the additional info