ElastiCache Serverless with secure firewall configuration, encryption, backup enabled, and alerting.
Install Node.js and npm first!
npm i @cfn-modules/elasticache-serverless
---
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
CacheName: 'demo' # required
SnapshotRetentionLimit: '35' # optional
MaxDataStorageLimit: 10 # optional
MaxECPUPerSecondLimit: 1000 # optional
TemplateURL: './node_modules/@cfn-modules/elasticache-serverless/module.yml'
none
none
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 | ||
SnapshotRetentionLimit | The number of days for which ElastiCache retains automatic snapshots before deleting them (set to 0 to disable backups) | 35 | no | [0...35] |
MaxDataStorageLimit | The maximum amount of data stored in the cache. | 10 | no | [1...] |
MaxECPUPerSecondLimit | Maximum number of ECPU per second. Must be between 1000 and 15000000. You can set the value to zero to remove the limit. | 1000 | no | [1000...15000000] |
CacheName | The unique name for the cache. | no | yes | Max 40 characters. |
- All connections to database require TLS.
- Valkey/Redis runs in cluster mode, clients/apps need to support that.