| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
The AWS::ElastiCache::CacheCluster type creates an Amazon ElastiCache cache cluster.
{
"Type" : "AWS::ElastiCache::CacheCluster",
"Properties" :
{
"AutoMinorVersionUpgrade" : Boolean,
"CacheNodeType" : String,
"CacheParameterGroupName" : String,
"CacheSecurityGroupNames" : [ String, ... ],
"Engine" : String,
"EngineVersion" : String,
"NotificationTopicArn" : String,
"NumCacheNodes" : String,
"Port" : Integer,
"PreferredAvailabilityZone" : String,
"PreferredMaintenanceWindow" : String
}
} Indicates that minor engine upgrades will be applied automatically to the cache cluster during the maintenance window.
Required: No
Type: Boolean
Default: true
Update requires: replacement
The compute and memory capacity of nodes in a cache cluster.
Required: Yes
Type: String
Update requires: replacement
The name of the cache parameter group that is associated with this cache cluster.
Required: No
Type: String
Update requires: no interruption
A list of cache security group names that are associated with this cache cluster.
Required: Yes
Type: List of Strings
Update requires: no interruption
The name of the cache engine to be used for this cache cluster.
Required: Yes
Type: String
Update requires: replacement
The version of the cache engine to be used for this cluster.
Required: No
Type: String
Update requires: some interruptions
The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications will be sent.
Required: No
Type: String
Update requires: no interruption
The number of cache nodes that the cache cluster should have.
Required: No
Type: String
Update requires: some interruptions
The port number on which each of the cache nodes will accept connections.
Required: No
Type: Integer
Update requires: no interruption
The EC2 Availability Zone that the cache cluster will be created in.
Required: No
Type: String
Update requires: replacement
The weekly time range (in UTC) during which system maintenance can occur.
Required: No
Type: String
Update requires: no interruption
When updates are made to the following properties, AWS CloudFormation creates a replacement cache cluster resource first, changes references from other dependent resources to point to the replacement resource, and then deletes the old resource.
CacheNodeType
Engine
Port
PreferredAvailabilityZone
The ElastiCache cache cluster does not have a single endpoint, but you can obtain the
endpoints for individual cache nodes by defining a get-cache-nodes script
and installing it in the AWS::CloudFormation::Init section of the template. Full implementation
details can be viewed in the ElastiCache template example at: https://s3.amazonaws.com/cloudformation-templates-us-east-1/ElastiCache.template.
The Amazon ElastiCache template uses the AWS CloudFormation bootstrap script cfn-hup to detect changes to the Amazon ElastiCache cache cluster configuration, such as the number of instances in the cache cluster. It then runs a script to update the on-host configuration for the application.
Here is the code that demonstrates obtaining the cache node information with cfn-list-stack-resources:
"/etc/cfn/get-cache-nodes" : {
"content" : {
"Fn::Join" : [
"",
[
"# Define environment variables for command line tools\n",
"export AWS_ELASTICACHE_HOME=/home/ec2-user/elasticache/AmazonElastiCacheCli-1.5.000\n",
"export AWS_CLOUDFORMATION_HOME=/opt/aws/apitools/cfn\n",
"export PATH=$AWS_CLOUDFORMATION_HOME/bin:$AWS_ELASTICACHE_HOME/bin:$PATH\n",
"export AWS_CREDENTIAL_FILE=/etc/cfn/cfn-credentials\n",
"export JAVA_HOME=/usr/lib/jvm/jre\n",
"\n",
"# Grab the Cache node names and configure the PHP page\n",
"cfn-list-stack-resources ",
{ "Ref" : "AWS::StackName" },
" --region ",
{ "Ref" : "AWS::Region" },
" | grep CacheCluster | awk '{print $3}' | xargs -I {} elasticache-describe-cache-clusters {} --region ",
{ "Ref" : "AWS::Region" },
" --show-cache-node-info | grep CACHENODE | awk '{print $4 \",\" $5}' > /var/www/html/nodelist\n"
]
]
},
"mode" : "000500",
"owner" : "root",
"group" : "root"
} When the logical ID of this resource is provided to the Ref intrinsic
function, it returns the resource name.
For more information about using the Ref function, see Ref.
Fn::GetAtt returns a value for a specified attribute of this type.
This section lists the available attributes and corresponding return values.
The DNS address of the configuration endpoint for the cache cluster.
The port number of the configuration endpoint for the cache cluster.
For more information about using Fn:GetAtt, see Fn::GetAtt.
CreateCacheCluster in the Amazon ElastiCache API Reference Guide
ModifyCacheCluster in the Amazon ElastiCache API Reference Guide