When completing the AWS task “Expanding EC2 Instance Storage for Development Needs” it fails me with python output as the explanation. Most of the output has been moved to show the error.
/ssh.py:95: RuntimeError
=========================== short test summary info ============================
FAILED ../usr/share/test.py::test_volume_expansion - RuntimeError: CommandRes...
============================== 1 failed in 2.46s ===============================
Here’s the proof that the volume was expanded in AWS Console, as well as in the ec2.
Sorry about that, this is in the KodeKloud Engineer practice “Cloud (AWS)” level 2, the second practice lab.
Looking through some other posts, my issue was due to connecting directly from the AWS console instead of SSH’ing from the terminal.
I SSH’d and as a precaution ran the command found at the link below on the jump host to make sure the ec2 was added to known_hosts. It was successful after those steps were done.
Often you can connect via the EC2 Instance Connect option in the console, provided a public IP is available and ssh is not firewalled off. But using the terminal is fine as well, and is more likely to work if you’ve created a keypair that AWS knows about. But it sounds like you have this working, in any event.