Adding automated AMI generation to EC2 with Ruby server start up script

Can packer read these from environment variables?