3

I have a cloud formation script shown below, I hope to create a Security Group and Elasti Cache. However I get an error shown below CREATE_FAILED AWS::ElastiCache::CacheCluster CacheSecurityGroup not found: elasticacheta....

I use cloudformation routinely but never with the cache. I do not want to use a VPC in my scenario and have gone through the documentation http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cache-cluster.html and related links but with no luck - help appreciated.

AWSTemplateFormatVersion: '2010-09-09' Resources: ElasticacheSecurityGroup: Type: AWS::EC2::SecurityGroup Properties: GroupDescription: "Access from webservers only" SecurityGroupIngress: - IpProtocol: tcp CidrIp: 0.0.0.0/0 FromPort: '11211' ToPort: '11211' ElasticacheCluster: Type: "AWS::ElastiCache::CacheCluster" DependsOn: ElasticacheSecurityGroup Properties: AutoMinorVersionUpgrade: "true" Engine: "memcached" CacheNodeType: "cache.t1.micro" NumCacheNodes: "1" CacheSecurityGroupNames: - Ref: ElasticacheSecurityGroup 
2
  • 2
    Try using AWS::ElastiCache::SecurityGroup instead of AWS::EC2::SecurityGroup for non-VPC configurations. Commented Nov 21, 2016 at 7:27
  • That helped - It worked! Commented Nov 21, 2016 at 17:15

1 Answer 1

1

Echoing jordanm's comment, change the resource type to AWS::ElastiCache::SecurityGroup

So it should look like this:

Resources: ElasticacheSecurityGroup: Type: AWS::ElastiCache::SecurityGroup Properties: Description: "Access from webservers only" ElasticacheCluster: Type: "AWS::ElastiCache::CacheCluster" DependsOn: ElasticacheSecurityGroup Properties: AutoMinorVersionUpgrade: "true" Engine: "memcached" CacheNodeType: "cache.t1.micro" NumCacheNodes: "1" CacheSecurityGroupNames: - Ref: ElasticacheSecurityGroup 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.