Use Elasticcache with Elasticbeanstalk

This article describes how to use Elasticcache with Elasticbeanstalk.


Prepare Elasticcache

  • (1) Go to Elasticcache Console
  • (2) Create new instance(Redis/Memcached) on Elasticcache
  • (3) Create security group for the instance and configure it to use the instance by Elasticbeanstalk security group

Confirmation

You should confirm to connect the Elasticcache from Elasticbeanstalk instance.

1
2
3
4
5
6
7
8
9
10
11
12
13
# local
$ eb ssh
# Elasticbeanstalk instance
$ sudo su -
$ cd /tmp
$ yum install -y git
$ git clone http://github.com/antirez/redis.git
$ cd redis && git checkout 3.2 # Please set newest Redis version
$ make redis-cli
$ cd src
$ ./redis-cli -h ELASTICCACHE_ENDPOINT -p ELASTICCACHE_PORT
#=> ELASTICCACHE_ENDPOINT > ... <= successful!

Happy Hacking!

Special Thanks