Getting Started with AWS

Building a fast session store for your online applications

with Amazon ElastiCache for Redis

Module 1: Create a Redis Cluster

To get started, you will learn how to set up your first Redis Cluster, and configure its node type and security group

Overview

To get started, you will learn how to set up your first Redis Cluster, and configure its node type and security group.

 Time to Complete

10 minutes

Implementation

  • Open the Amazon ElastiCache Dashboard, then:

    1.1 — On the top right corner, select the region where you want to launch your Redis Cluster.

    1.1 — On the top right corner, select the region where you want to launch your Redis Cluster.

    1.2 — Click on “Get Started Now”.

    1.2 — Click on “Get Started Now”.

    1.3 — Select “Redis” as your Cluster engine.

    1.3 — Select “Redis” as your Cluster engine.
  • 1.4 — Choose a name for your Redis Cluster, e.g. “elc-tutorial”.

    1.4 — Choose a name for your Redis Cluster, e.g. “elc-tutorial”.

    1.5 — Change the Node type to cache.t2.micro.

    That node type is fine for this tutorial, but for a production cluster the size of the node should depend on your workload and you should start with the m5 or r5 instance families.

    1.5 — Change the Node type to cache.t2.micro.

    1.6 — In Number of replicas, select 1.

    That read-only replica will allow you to scale your reads. In case of a failure, an automatic failover will be triggered and the replica will take over the role of the master node.

    1.6 — In Number of replicas, select 1.
  • 1.7 — Check the box for “Multi-AZ with Auto-Failover”.

    1.7 — Check the box for “Multi-AZ with Auto-Failover”.

    1.8 — Select a Subnet group.

    If you need more information about Subnet groups, please refer to the documentation.

    1.8 — Select a Subnet group.

    1.9 — For Preferred availability zone(s), select “No preference”.

    Each node will be created in a different availability zone. This is a best practice for improved reliability.

    1.9 — For Preferred availability zone(s), select “No preference”.
  • For this example we won’t use encryption, but keep in mind you can configure both encryption for data at-rest and for data in-transit.

    1.10 — Select a Security group for your Redis Cluster.

    This is important: make sure the Security group you select allows incoming TCP connections on port 6379 from your EC2 instance. If that’s not the case, you won’t be able to connect to your Redis nodes.

    1.10 — Select a Security group for your Redis Cluster.
  • For this example, we won’t load any seed RDB file so we can skip this configuration step altogether. Just keep in mind that this option is available.

  • Daily backups are important for most use cases, and a good recommendation is to enable backups with a retention period that will give you enough time to act in case anything bad happens. For this tutorial, we won’t use any backups.

    1.11 — Uncheck “Enable automatic backups”.

    1.11 — Uncheck “Enable automatic backups”.
  • 1.12 — Specify a maintenance window that suits your needs.

    For this tutorial, it suffices to specify “No preference”.

    Here you can think about the time and day when your application has a low workload. For our current needs, we can just state “No preference”.

    1.12 — Specify a maintenance window that suits your needs.
  • After a review of all the fields in the form, click “Create”.

    1.13 — Click on “Create”.

    A Redis Cluster will get initialized and once it becomes “available” you will be able to continue the next step.

    1.13 — Click on “Create”.

Was this module helpful?

Session Caching with Redis