cfn-modules: ElastiCache redis
ElastiCache redis cluster with secure firewall configuration, encryption, multi AZ, backup enabled, and alerting.
Install
Install Node.js and npm first!
npm i @cfn-modules/elasticache-redis
Usage
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'cfn-modules example'
Resources:
Cache:
Type: 'AWS::CloudFormation::Stack'
Properties:
Parameters:
VpcModule: !GetAtt 'Vpc.Outputs.StackName' # required
ClientSgModule: !GetAtt 'ClientSg.Outputs.StackName' # required
AlertingModule: '' # optional
BastionModule: '' # optional
KmsKeyModule: '' # optional
EngineVersion: '5.0.5' # optional
CacheNodeType: 'cache.t2.micro' # optional
TransitEncryption: 'true' # optional
AuthToken: '' # optional
SnapshotRetentionLimit: '35' # optional
SnapshotName: '' # optional
NumShards: '1' # optional
NumReplicas: '1' # optional
CacheParameterGroupName: '' # optional
TemplateURL: './node_modules/@cfn-modules/elasticache-redis/module.yml'
Examples
none
Related modules
none
Parameters
Name | Description | Default | Required? | Allowed values |
---|---|---|---|---|
VpcModule | Stack name of vpc module | yes | ||
ClientSgModule | Stack name of client-sg module where traffic is allowed from on port 6379 to the cache | yes | ||
AlertingModule | Stack name of alerting module | no | ||
BastionModule | Stack name of module implementing Bastion | no | ||
KmsKeyModule | Stack name of kms-key module | no | ||
EngineVersion | Redis version | 5.0.5 | no | [5.0.5,5.0.6,6.0,6.2] |
CacheNodeType | The compute and memory capacity of the nodes in the node group (shard) | cache.t2.micro | no | |
TransitEncryption | Enable [encryption for data in transit](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/in-transit-encryption.html)? | true | no | [true, false] |
AuthToken | Password (16 to 128 characters) used to authenticate against Redis (requires TransitEncryption := true; leave blank to disable password-protection) | no | ||
SnapshotRetentionLimit | The number of days for which ElastiCache retains automatic snapshots before deleting them (set to 0 to disable backups) | 35 | no | [0...35] |
SnapshotName | Name of a snapshot from which you want to restore (leave blank to create an empty cache) | no | ||
NumShards | Number of shards in the cluster. | 1 | no | [1-250] |
NumReplicas | Number of replicas per shard. | 1 | no | [0-5] |
CacheParameterGroupName | Name of a cache parameter group | no |
Limitations
- Scalable: Cache instances capacity (CPU, RAM, network, ...) is limited by design
- Monitoring: Network In+Out is not monitored according to capacity of instance type