Skip to main content

Blueprint: cache-layer

Add a managed Redis cluster to any existing service.

This is an add-on blueprint. It is designed to be deployed alongside an existing service blueprint (e.g., ecs-fargate-rds). It reads your existing VPC and security group IDs and provisions ElastiCache Redis in the same network.

Architecture

Existing App (ECS / Lambda)

│ port 6379

ElastiCache Redis (private subnet)
│ TLS + at-rest encryption


SSM Parameter Store
(/service/env/redis/url)

AWS resources provisioned

ResourceDetails
ElastiCache Replication GroupRedis 7.1, configurable node type
Subnet GroupPlaced in VPC private subnets
Security GroupOnly allows ingress from your app SG
SSM ParameterRedis connection URL stored at /service/env/redis/url
CloudWatch AlarmsCPU, memory usage, evictions

Deploy

idp blueprint deploy cache-layer \
--name my-service \
--env dev \
--region us-east-1

Context parameters

ParameterDefaultDescription
serviceName✅ requiredService name prefix
env✅ requireddev / staging / production
region✅ requiredAWS region
redisNodeTypecache.t4g.microElastiCache node type
redisEngineVersion7.1Redis engine version
multiAzfalseEnable Multi-AZ with automatic failover
numCacheClusters1Number of replica nodes (min 2 if multiAz=true)
vpcIdImport an existing VPC (creates minimal VPC if omitted)
appSecurityGroupIdApp SG that is allowed to connect to Redis

Outputs

OutputDescription
RedisPrimaryEndpointRedis primary endpoint address
RedisUrlParamNameSSM Parameter name holding the connection URL

Reading the connection URL in your service

aws ssm get-parameter \
--name "/my-service/dev/redis/url" \
--with-decryption \
--query "Parameter.Value" \
--output text