0
votes

I'm setting up an auto-scaling group using cloud formation, and running a script via UserData on server startup. At the end of the user data script, I'm attempting to call cfn-signal to let the autoscaling group know that instance startup is complete:

cfn-signal -s true --stack stack_name --resource resource_name --region region_name

However, I'm receiving the following error:

cfn-signal: command not found

cfn-signal is definitely installed on the machine:

[ec2-user@ip-xxx-xx-xx-xx ~]$ which cfn-signal
/opt/aws/bin/cfn-signal
1

1 Answers

2
votes

It turns out that the symlink to cfn-signal must not be created until after the UserData script is run.

I was able to use cfn-signal by calling it with the full path /opt/aws/bin/cfn-signal