Troubleshooting EC2 Boot Scripts
Want to troubleshoot your boot scripts for EC2?
Tee
the output like so.
#!/usr/bin/env bash
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
sudo su
yum update -y
# bla blah bloing
# ...
When your instance is launching, ssh
into it and tail the logs.
tail -f /var/log/user-data.log
Hot pajamas!