Systems Manager Session Manager / EC2 Instance Connect also make this a bit easier, and don't require a reboot... The instance may not have the needed bits baked in depending upon age, of course.
I’ve usually done this by attaching the volume or a snapshot of the volume to a temporary instance and going directly to the filesystem to get whatever I need off it.
5 comments
[ 3.4 ms ] story [ 13.9 ms ] threadAs a consultant, I have got to work many times with non-technical customers who don't have access to the servers running their applications.
I ended up writing small notes on how I have been gaining access to EC2 instances.
In short, AWS allows running scripts after the instance boots, which can be leveraged to introduce a "backdoor", like authorizing a new ssh key.
This is super helpful, unfortunately, it does not always work, specially on old instances like the ones I have been taking over.