Sudo: Unable to resolve host ip

Could you help please, this is my first post.

I’m using ubuntu 20.04 lTS on aws lightsail. Unable to upgrade Cyberpanel to version.

when I run command “sudo apt update && sudo apt upgrade -y” get the following error “sudo: unable to resolve host ip----**: Name or service unknow”

The ip it show’s is the private ip for the server, not the public ip

many thanks
Shaz

well just check /etc/hosts and make sure you gave it a name, like

127.0.0.1 myawesomeserver