Owen Conti

Connecting to ElastiCache with Laravel when using Encryption In-Transit

Posted on under Laravel by Owen Conti.

If you're using ElastiCache with the Encryption In-Transit setting turned on, you'll need to tweak your REDIS_HOST environment variable when connecting with Laravel:

1// Before
2REDIS_HOST=some-master-node.cache.amazonaws.com
3 
4// After
5REDIS_HOST=tls://some-master-node.cache.amazonaws.com

That will tell your Redis client to use TLS when connecting to your ElastiCache instance.


Thanks for reading this article!

Hopefully you found this article useful! If you did, share it on Twitter!

Found an issue with the article? Submit your edits against the repository.