Skip to content

How to handle RedisClient::CommandError: ERR IAM Authentication service is not available error? #261

@emmanuel-chime

Description

@emmanuel-chime

For some context this is what our applications use:

  • redis-rb v5.4.1
  • redis-client v0.26.1
  • Redis v7.1.0 on ElastiCache
  • IAM authentication

We occasionally receive this error in our applications when trying to establish a connection with our Redis client:
redis_client/connection_mixin.rb:80:in `call_pipelined': ERR IAM Authentication service is not available. (rediss://master.xxx.xxx.use1.cache.amazonaws.com:6379) (RedisClient::CommandError)

This then results in a NOAUTH on all subsequent requests to this client:
redis_client/connection_mixin.rb:44:in `call': NOAUTH Authentication required. (rediss://master.xxx.xxx.use1.cache.amazonaws.com:6379) (RedisClient::CommandError)

I have reached out to AWS support about the IAM Authentication service is not available error and they said that it is a bug on their end that they are working to fix, but they do not have a timeline for the fix.

Is it possible to force a re-auth in the case of the IAM Authentication error or force closing the connection when receiving a NOAUTH Authentication required error? Closing the connection will force a re-auth on the next call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions