Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JAVA API For AWS Elasticache

Yesterday I launched our first AWS Elasticache Redis instance, but haven't been able to use it yet via a JAVA API (Although the HTTP API seems quite straightforward to use)

I've tried first using the libraries available by including the following in the pom.xml file:

    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk</artifactId>
        <version>1.11.86</version>
    </dependency>

Then I realized I must just need:

    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk-elasticache</artifactId>
        <version>1.11.86</version>
    </dependency>

But there's also available:

    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>elasticache-java-cluster-client</artifactId>
        <version>1.1.1</version>
    </dependency>

And I've found the Javadoc at:

http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/elasticache/AmazonElastiCacheClient.html

But haven't able to really put/get data from the cache, as I haven't found any actual instructions on the libraries, could anyone please point me in the correct direction?

like image 276
gvasquez Avatar asked Oct 30 '25 18:10

gvasquez


1 Answers

aws-java-sdk-elasticache is only for managing your Elasticache resources through the AWS API. Not for connecting and manipulating data inside the Elasticache server.

I think elasticache-java-cluster-client is only for Memcached clusters. Are you using Memcached or Redis?

If you are using Redis you should use a Java Redis client like Jedis.

like image 136
Mark B Avatar answered Nov 01 '25 10:11

Mark B



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!