- Newest
- Most votes
- Most comments
IAM authentication is available when using ElastiCache for Valkey 7.2 and above or Redis OSS version 7.0 and above. Did you check your Redis version?
Also as it is mentioned in the AWS Authenticating with IAM documentation generate the short-lived IAM authentication token using an AWS SigV4 pre-signed request.
answered a year ago
Hello,
Greetings of the day!! Thank you for contacting AWS.
I understand you're experiencing authentication errors while trying to set up IAM authentication for ElastiCache for Redis, specifically receiving "Server closed the connection" and "Protocol version is not an integer or out of range" errors when attempting to connect using redis-cli with the generated token.
Can you please verify your IAM Authentication setup i.e in-transit is enabled and tls is configured at client side. Also, make sure you use --tls flag with redis-cli and installed redis-cli supports TLS.
To check if the installed redis-cli supports TLS, run below command: $ redis-cli --help | grep tls
If TLS is not supported, then reinstall the same using below document: https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/connect-tls.html#connect-tls.linux
For reference: https://aws.amazon.com/blogs/database/simplify-managing-access-to-amazon-elasticache-for-redis-clusters-with-iam/
If you've verified all the above configurations and are still experiencing issues, we require details that are non-public information i.e details that are specific to your AWS account and would need more details on your setup. Hence, please open a support case with AWS using the following link https://console.aws.amazon.com/support/home#/case/create.
answered a year ago
'Transit encryption mode' is set to required and the client is supporting TLS and i am using '--tls' while connecting.
Relevant content
asked a year ago

I am on Redis OSS 7.1.0 and the token generation code is in the post.