JAVA API For AWS Elasticache

10,182

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.

Share:
10,182
gvasquez
Author by

gvasquez

Computer Science Engineer, entrepeneur, nature fan

Updated on June 04, 2022

Comments

  • gvasquez
    gvasquez almost 2 years

    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?