mitchellh/vagrant-aws — pull request #26 by a13m (2013-03-31 15:57:49+00:00)
Title: Allow user_data in configuration

In some cases, it's useful to pass user_data to an AMI to tweak it prior to vagrant's configuration. In my particular case, the problem was that /etc/sudoers in the AMI included "Default requiretty", which caused vagrant sudo commands to fail. This patch, together with an extra config line:

aws.user_data = "#!/bin/sh\nsed -i -e 's/^\\(Defaults.*requiretty\\)/#\\1/' /etc/sudoers\n"

worked around the problem nicely.