Connect to AWS ElastiCache with In-Transit Encryption

后端 未结 2 1374
清歌不尽
清歌不尽 2021-01-02 06:44

ElastiCache with encryption uses TLS to communicate with redis client, yet as I\'ve seen redis clients in all languages (ioredis, predis, go-redis) require a pem file when c

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-02 07:03

    Here is my working demo code using Predis.

    $servers = ['tls://master.my-test-redis.8juowe.euw2.cache.amazonaws.com:6379']; // your endpoint
    $options = ['parameters' => ['password' =>   $password ]]; // put your password here
    $redis   = new Predis\Client($servers, $options ); // Instance your client
    

提交回复
热议问题