logo
Menu
Meet Amazon Q Developer: Your Generative AI Assistant That Wears Multiple Hats

Meet Amazon Q Developer: Your Generative AI Assistant That Wears Multiple Hats

In this blog post, we will review how Amazon Q Developer can help with various aspects of our day to day AWS journey, including coding, selecting the right instances, troubleshooting connectivity issues and S3 errors, writing CloudWatch Log and CloudTrail queries quickly and more. Truly an assistant that wears multiple hats!

AnupSivadas
Amazon Employee
Published Jul 9, 2024
Last Modified Jul 10, 2024
Amazon Q Developer is right there when you need it within your favorite IDE, and that's one of the most common ways Q is leveraged by many developers.
You can use Q within the IDE to generate fresh code or leverage existing code and do some interesting aspects like Explain, Refactor, Fix and Optimize.
Amazon Q within IDE
Amazon Q within IDE
Oh, by the way, have you noticed that you can leverage the 'Send to Amazon Q' option by selecting the whole code or a portion of it? That's pretty nifty, right?
Send to Amazon Q option
Send to Amazon Q
Of course, Q can generate new code for you as and when you need it, and you can iterate on the code on the fly.
Amazon Q generating code
Amazon Q generating code
Now, let's switch gears and see how Q can help you pick the right EC2 Instance Type. Trust me, this is a common question that I get all the time: 'Which instance should I pick for my use case?
Q is deeply integrated within AWS console. When you are at the Launch an instance page, Q is right readily available there to give you advice.
Click on Get advice option and enter the workload type, use case, priority and CPU manufacturer details to get recommendation.
EC2 Instance Recommendation
EC2 Instance Recommendation
Instance Recommendation Workload Details
Instance Recommendation Workload Details
Instance Recommendation Results
Instance Recommendation Results
And the best part, you can see all the recommended instance family details by accessing the link. Very handy to know all the characteristics in one go.
Recommended Instance Details
Recommended Instance Details
Alright, let's assume we followed the recommendations and created the EC2 instance. One common issue that I'm pretty sure most of us have faced is around connectivity for the instance we created. Let's see how Q can help us troubleshoot this.
For the walkthrough, I created a tiny t2.micro and assume that I cant connect to it. I can trigger Q right from the console and ask -
"I cant connect to my EC2 instance that I just created"
Q helping with Instance Connectivity Issues
Amazon Q helping with Instance Connectivity Issues
Amazon Q works with VPC Reachability Analyzer to provide an interactive generative AI experience for troubleshooting network connectivity issues. Within the context of Q, you can trigger the preview experience of VPC Reachability Analyzer to get insights on potential causes.
Amazon Q network troubleshooting
Amazon Q network troubleshooting
The instance was created no inbound rules for the security group and the VPC Reachability Analyzer will lead you to this issue.
The integration with Q and VPC Reachability Analyzer makes life easy when it comes to connectivity errors and its troubleshooting. Welcome to 2024!
Switching gears to S3! How about Q helping us troubleshoot errors around S3.
I have a file in one of my buckets, and I'm trying to query it using S3 SELECT. Boom! I immediately encountered an error:
S3 SELECT Error
S3 SELECT Error
If you look closely, you can see the 'Diagnose with Amazon Q' option right there alongside the error. Phew! What a relief.
Q provides me with more insights into why this error is happening.
The error indicates that the object you are attempting to access is not encoded in UTF-8 format, which is required by Amazon S3. Objects stored in S3 must use UTF-8 encoding, and the system encountered text that was not in the proper format near byte 8,192 of the object.
Amazon Q Diagnose
Amazon Q Diagnose
In some cases, Q can also help you resolve the issue.
Diagnose with Amazon Q Resolution
Diagnose with Amazon Q Resolution
Running out of gears, but let's switch again! How about using Q for writing better CloudTrail queries?
Within CloudTrail Lake, you can leverage the new Query Generator option to create queries by simply stating your requirement in natural language, like so:
Query Generator feature within CloudTrail
Query Generator feature within CloudTrail
We can be creative and ask what specific services caused the error. Trying to see if CloudTrail caught the errors we had when tried S3 SELECT above.
Query generator feature within CloudTrail
Query generator feature within CloudTrail
Amazon Q Developer, with its deep integration within the AWS console and other services, proves invaluable in your daily tasks, whether you are a developer, engineer, architect, or operations professional. Amazon Q Developer is always there for you.
There is more integrations around Amazon Q Developer that I didn't cover in this post, and I'm interested to hear about other situations where you have found Amazon Q to be useful. Please do share your thoughts and feedback.
#LetsGo #Build
 

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

Comments