Changed AWS EC2 firewall rule and locked out of ssh

I'm afraid not. Other than restoring from a snapshot or reinstalling from scratch your best option is probably using another EC2 instance to fix the file.

  1. Shut down your SLES instance (don't terminate)
  2. Note down what the root volume device name is (probably /dev/sda1 or /dev/xvda)
  3. Detach the volume and attach to another helper instance.
  4. Fix the firewall file.
  5. Unmount and detach the volume from the helper instance and re-attach to the original one under the correct name (/dev/sda1 or /dev/xvda)
  6. Start up and SSH in :)

Hope that helps.