Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My CloudFormation template creates an autoscale group and bootstrap it with utility script /opt/aws/bin/cfn-init. When I remove the bootstrap part out of my template the, autoscale get created without any problem, but I add it the CloudFormation Stack fails and add line in /var/log/cloud-init.log :

Error: AutoScalingGroupName does not specify any metadata

The line above appens right after the following command :

/opt/aws/bin/cfn-init --verbose --configsets orderedConfig --region us-east-1 --stack AS15 --resource AutoScalingGroupName --access-key XXXXXXXXXXXXX --secret-key XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Digging a little bit deeper, in cfn-init I added the following lines the point where it exit:

from pprint import pprint
pprint(vars(detail))

and I get the following trace when running the previous cfn-init command :

{'_description': None,
 '_lastUpdated': datetime.datetime(2012, 7, 12, 14, 52, 42),
 '_logicalResourceId': u'AutoScalingGroupName',
 '_metadata': None,
 '_physicalResourceId': u'AS15-AutoScalingGroupName-HNPOXXXXXXXX',
 '_resourceStatus': u'CREATE_COMPLETE',
 '_resourceStatusReason': None,
 '_resourceType': u'AWS::AutoScaling::AutoScalingGroup',
 '_stackId': u'arn:aws:cloudformation:us-east-1:XXXXXXXXXXXXX:stack/AS15/XXXXXXXX-cc30-11e1-XXXXXX-XXXXXXXXXX',
 '_stackName': u'AS15'}

As you can see, the metadata field is empty and that's the reason why it fails to create the stack. Is there any known side effects for cfn-init when used with autoscale ?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

I just figured it out! The parameter --resource of cfn-init script have to be set with the Launch Configuration name and not the AutoScale Group name. Wish that could help someone :)

share|improve this answer
1  
Helped me... Thx. –  Jeffrey Hulten Jul 26 '12 at 7:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.