Kernel Panic to AWS instance.
There may be multiple reason. Follow the steps which are generic for every case:
1.) Bring impacted instance in stopped state.
2.) Detach the root instance.
3.) Bring up the new instance in the same AZ.
4.) Attach the root volume as secondary disk to the new instance.
5.) Mount the volume and look the logs for cause of panic.
If you observe the error related to fstab rectify the fstab entry and follow the below generic steps.
If you observe the panic issue follow the below steps.
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/grub2/grub.cfg
sudo dracut -f -vvvvv
dracut -f -vvvvv
cd boot/
awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
grub2-set-default 1
awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
grub2-mkconfig -o /boot/grub2/grub.cfg
Once new grub image has been created, make it default image in grub.conf.
6.) Detach the secondary volume and attach volume back to impacted instance.
7.) Boot the instance and hopefully it will be up and running.