added AWS instance id default, will look up from the instance Metadata. Made the --foreground flag a boolean value