Detach and fix the volume of the problem instance using another instance
- Launch a new instance (recovery instance).
- Stop the original instance (DO NOT TERMINATE)
- Detach the volume (problem volume) from the original instance
- Attached it to the recovery instance as /dev/sdf.
- Login to the recovery instance via ssh/putty
sudo lsblkto display attached volumes and confirm the name of the problem volume. It usually begins with
/dev/xvdf. Mine is
- Mount problem volume.
$ sudo mount /dev/xvdf1 /mnt $ cd /mnt/etc/ufw
ufw configuration file
$ sudo vim ufw.conf
- Press i to edit the file.
- Type Ctrl-C and type :wq to save the file.
- Display content of ufw conf file using the command below and ensure that
ENABLED=yeshas been changed to
$ sudo cat ufw.conf
$ cd ~ $ sudo umount /mnt
- Detach problem volume from recovery instance and re-attach it to the original instance as /dev/sda1.
- Start the original instance and you should be able to log back in.
If you have any problem please call me aws support – +91-9555699081