After Ubuntu 18.04 ec2 restart the public Ip changed and throws internal server error

That’s great news! See Blank page with passbolt badge after authentication

… for recent example of same issue. Blank page is because an upgrade is needed.