Similar to this question,
My user data is:
#!/bin/bash echo 'test' > /home/ubuntu/user-script.txt Using a standard Ubuntu AMI, this works fine.
I have a custom AMI that I have created by standing up a standard Ubuntu AMI, running an Ansible playbook and creating an AMI from that. When I configure my launch config to use my custom AMI, user data is NOT run. There is no other difference.
I understand that it may be due to the semaphore files so I stood up an instance of my AMI, deleted /var/lib/cloud/sem/* and created a new AMI. I created a new launch configuration with this AMI and got the same result.
I repeated this process, this time removing /var/lib/cloud/*. Same result.
Any ideas? This has got to be possible, right?