Home icon

Integrate your Spring Boot application with Amazon ElastiCache using Spring Data Valkey

Database Blog



This article demonstrates integrating Spring Boot applications with Amazon ElastiCache using Spring Data Valkey for caching instead of Spring Data Redis.

  • Add Spring Data Valkey dependencies and configure ValkeyCacheManager for transparent caching with @Cacheable annotations
  • Create ElastiCache Serverless cache using AWS CLI and configure Spring properties with cache endpoint and TTL settings
  • Spring Data Valkey offers native AWS IAM authentication, eliminating need to store credentials in configuration files
  • Implement AZ-affinity routing to reduce cross-AZ data transfer costs and latency by routing reads to same-AZ replicas
  • Enable built-in OpenTelemetry support for observability and telemetry export to CloudWatch or other backends
  • Migrate from Spring Data Redis with minimal changes: update dependencies, configuration properties, and imports

Spring Data Valkey provides purpose-built Valkey support with improved performance, long-term support, and advanced features while maintaining API compatibility with Spring Data Redis.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Apr 16
2025
Integrate your Spring Boot application with Amazon ElastiCache
Oct 8
2024
Get started with Amazon ElastiCache for Valkey
Jun 29
2026
Amazon ElastiCache now supports Valkey 9.1
Oct 8
2024
Announcing Amazon ElastiCache for Valkey

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.