AWS ElastiCache Parameter Group

This page shows how to write Terraform and CloudFormation for ElastiCache Parameter Group and write them securely.

aws_elasticache_parameter_group (Terraform)

The Parameter Group in ElastiCache can be configured in Terraform with the resource name aws_elasticache_parameter_group. The following sections describe 3 examples of how to use the resource and its parameters.

Example Usage from GitHub
resource "aws_elasticache_parameter_group" "default" {
  name   = "cache-params"
  family = "redis3.2"
resource "aws_elasticache_parameter_group" "kong" {
  name   = format("%s-%s", var.service, var.environment)
  family = var.redis_family

  description = var.description
resource "aws_elasticache_parameter_group" "memcached" {
  name = "memcache-parameter-group"
  family = "memcached1.6"

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).


Explanation in Terraform Registry

Provides an ElastiCache parameter group resource.

NOTE: Attempting to remove the reserved-memory parameter when family is set to redis2.6 or redis2.8 may show a perpetual difference in Terraform due to an Elasticache API limitation. Leave that parameter configured with any value to workaround the issue.

Tips: Best Practices for The Other AWS ElastiCache Resources

In addition to the aws_elasticache_cluster, AWS ElastiCache has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.



Ensure to enable backup retention of Elasitcache

It's better to take snapshots of Redis clusters to improve data availability.



Ensure to enable in-transit encryption of ElastiCache

It's better to enable in-transit encryption of ElastiCahe. If the ElastiCache replication group uses unencrypted traffic, it is vulnerable to meet-in-the-middle (MITM) attacks.

Review your AWS ElastiCache settings

In addition to the above, there are other security points you should be aware of making sure that your .tf files are protected in Shisho Cloud.

AWS::ElastiCache::ParameterGroup (CloudFormation)

The ParameterGroup in ElastiCache can be configured in CloudFormation with the resource name AWS::ElastiCache::ParameterGroup. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.


Explanation in CloudFormation Registry

The AWS::ElastiCache::ParameterGroup type creates a new cache parameter group. Cache parameter groups control the parameters for a cache cluster.

Frequently asked questions

What is AWS ElastiCache Parameter Group?

AWS ElastiCache Parameter Group is a resource for ElastiCache of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS ElastiCache Parameter Group?

For Terraform, the anantha199456/elastic-cache-challenge, awsautomation/kongUAT and LKHetzel/tftest source code examples are useful. See the Terraform Example section for further details.