I blocked myself from SSH in AWS Lightsail. How can I recover access?

In the case where I mistakenly blocked myself from SSH access by enabling firewall or misconfigure SSH, is there anyway I can re-gain access to such instance?

As far as I know, there is no way to detach the root disk for lightsail :(


Solution 1:

If network is not an option (after enabling a Firewall that wasn't configured properly), the option is connecting locally.

That is, connect to the console trough your administration web panel and login locally. Then, configure the firewall properly so you can then connect again via SSH.