Demo code to deploy and test Amazon ElastiCache in hybrid architectures with database living on-premises or in AWS.
To deploy and test the template:
-
Download the template by cloning the repo:
git clone https://github.com/awslabs/elasticache-hybrid-architecture-demo
-
Log into AWS Console
-
Go to AWS Cloudformation's console and click on "Create Stack"
-
Select "Upload a template to Amazon S3" and choose the file "cloudformation-template.yaml", click Next
-
Give a name to your Stack like "ElastiCacheDemo", fill the Parameters and click Next, the most important parameters are:
Parameter Description DatabaseServer It is your database address, IP or hostname DatabaseName Name of your database or schema DatabaseUsername Your database's username KeyName Your key pair to SSH access the instance Vpc VPC where your Amazon EC2 instance will be deployed Subnet Subnet where your Amazon EC2 instance will be deployed -
Select the Tags to include in your Stack and click Next
-
Review your options, select the "I acknowledge that AWS CloudFormation might create IAM resources." and click on "Create"
-
Once the Stack is ready, go to "Outputs", copy the "DemoScript" URL and open it in your web browser
Test your queries directly from your database as well as using cache to compare response times!