Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

AWS Logo
Menu
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