Restarting apache is not enough. You need to restart the server as you can see in the prompt of you machine:
*** System restart required ***
Kernel updates require a restart, otherwise the are not being applied.
If you want automatic update you have to install "unattended-upgrades" an configure what you want to be installed automatically.
SSH connection to a newly created Ubuntu EC2 instance failsAccepted Answerasked 4 months ago
How to set up SSH access to EC2 running Ubuntu
Unable to SSH to the ubuntu managed node using instance-idAccepted Answerasked 5 months ago
Ubuntu 18.04 AMI with "ubuntu-desktop" pkg fails to connect (networking)asked 4 years ago
EC2 ubuntu 18.04 fresh + apache2 install CONNECTION REFUSEDasked 3 years ago
Updating Ubuntu on EC2 instanceAccepted Answer
Cron jobs on Ubuntu EC2 Instanceasked 10 months ago
SSH connection from my local terminal to EC2 ubuntu instance is timed out.asked 12 days ago
Connect Ubuntu Lightsail instance to PPTP VPN freezes/crashes instanceasked 10 months ago
i am using free tier as a new user. i am connecting my EC-2 instance from my laptop through putty.Accepted Answerasked 4 months ago