This tutorial shows how to install RedisInsight on an AWS EC2 instance and manage ElastiCache Redis instances using RedisInsight. To complete this tutorial you must have access to the AWS Console and permissions to launch EC2 instances.

Step 1: Create a new IAM Role (Optional)

RedisInsight needs read-only access to S3 and ElastiCache APIs. This is an optional step.

  1. Login to AWS Console, and navigate to IAM screen
  2. Create a new IAM Role
  3. Under Select type of trusted entity, choose EC2. In other words, the role is used by an EC2 instance
  4. Assign the following permissions:
    • AmazonS3ReadOnlyAccess
    • AmazonElastiCacheReadOnlyAccess

Step 2: Launch EC2 Instance

Next, launch an EC2 instance.

  1. Navigate to EC2 under AWS Console
  2. Click Launch Instance
  3. Choose 64 bit Amazon Linux AMI
  4. Choose at least a t2.medium instance. The size of the instance depends on the memory used by your ElastiCache instance that you want to analyze
  5. Under Configure Instance:
    • Choose the VPC that has your ElastiCache instances
    • Choose a subnet that has network access to your ElastiCache instances
    • Ensure that your EC2 instance has a public IP Address
    • Assign the IAM role that you created in Step 1
  6. Under the storage section, ensure at least 100 GiB storage
  7. Under security group, ensure that:
    • Incoming traffic is allowed on port 8001
    • Incoming traffic is allowed on port 22 only during installation
  8. Review and launch the ec2 instance

Step 3: Verify Permissions and Connectivity

Next, verify the EC2 instance has the required IAM permissions, and can connect to ElastiCache Redis instances.

  1. SSH into the newly launched EC2 instance
  2. Open a command prompt
  3. Run the command aws s3 ls. This should list S3 buckets
    1. If the aws command cannot be found, make sure your ec2 instance is based of amazon linux
  4. Next, find the hostname an ElastiCache instance you want to analyze, and run the command echo info | nc <redis host> 6379
  5. If you see some details about the ElastiCache redis instance, you can proceed to the next step
  6. If you cannot connect to redis, you should review your VPC, subnet, and security group settings.

Step 4: Install Docker on EC2

Next, install Docker on the EC2 instance. Run the following commands:

  1. sudo yum update -y
  2. sudo yum install -y docker
  3. sudo service docker start
  4. sudo usermod -a -G docker ec2-user
  5. Log out and log back in again to pick up the new docker group permissions.
  6. To verify, run docker ps. You should see some output without having to run sudo

Step 5: Run RedisInsight Docker Container

Finally, we can now install RedisInsight. Run the following command

docker run -v redisinsight:/db -p 8001:8001 redislabs/redisinsight:latest

This command downloads and runs the RedisInsight docker image and exposes it as a web page on port 8001.

Find the IP Address of your EC2 instances, and a launch your browser to http://<EC2 IP Address>:8001. You should see the Databases page of RedisInsight. Accept the EULA and start using RedisInsight.

Summary

In this guide, we installed RedisInsight on an EC2 instance running Docker. As a next step, you should now add an ElastiCache Redis Instance and then run the memory analysis.