Query AWS resources using Amazon Q Developer, interact with them on the CLI

Query AWS resources using Amazon Q Developer, interact with them on the CLI

Follow along as I debug an SSH connection failure, and fix it using Amazon Q Developer

Nathan Peck
Amazon Employee
Published Jul 11, 2024
Today I temporarily lost access to an EC2 instance I often connect to. Fortunately, Amazon Q Developer just launched the ability to chat with your AWS resources. I opened up the Q chat in the AWS console and asked a quick question to see whether my EC2 instance was actually running:

Okay, I can see that my EC2 instance is there and running, but why can't I connect to it? Let's check the security group to see if there is a connectivity issue there:

Ah that makes sense... that's not my current IP address, so my attempt to SSH is being blocked by the security group! To solve this problem, I open up the command line and run q chat to launch Amazon Q Developer on the CLI to ask how to solve this. I don't remember the right command and I am very lazy:

Just like that I've got commands to run, and all I have to do is make a small customization so that it uses the security group name from above:
A minute later I was in on my EC2 instance!
 

Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.

3 Comments