DEV Community

Cover image for Amazon Q Developer Simplified
Juan Taylor
Juan Taylor

Posted on

3 2 1 1 1

Amazon Q Developer Simplified

Amazon Q Developer, part of ‘Amazon Q’ which also covers ‘Amazon Q Business’ as well as Amazon Q in different AWS services such as ‘Amazon Quicksight’ and ‘Amazon Connect’, is the AI code assistant part of Amazon Q. In this article I attempt to simply the many facets of this service which finds its way in many part of AWS and within the context of the entire software development life cycle.

AMAZON Q DEVELOPER TASKS

  1. Understanding the code, AWS concepts and giving help in architecting solutions.
  2. Generating code or doing code transformations.
  3. Diagnose and troubleshoot errors.

AMAZON Q DEVELOPER TIERS

AMAZON Q DEVELOPER FREE TIER

Has monthly usage limits. No access to customizations. For users authenticating with AWS Builder ID.

AMAZON Q DEVELOPER PRO

Higher usage limits. Access to customizations. Must be a user in IAM Identity Center.

INLINE CODE SUGGESTIONS

As you type code, you will see code suggestions. You toggle to see different versions.
Press ‘Accept’ to accept. To Auto-complete you tab. Continuous code suggestions enable Amazon Q to continually guess what code should be added with multiple suggestions.

There is full function generation, where you add comments describing tasks and get entire code functions. You can accept pieces of code, step by step.

Q DEVELOPER CHAT

It all begins with Chat. You can ask about AWS concepts, general suggestions, architecting apps and workflows, even other technologies outside of AWS. It works only with files that are open, giving code optimizations you can copy.

To start a new conversation, and a new context, open a new tab in the panel. You can open 10 tabs at a time, and the context will Not be retained across conversations.

Chat is many times the beginning of the developer conversation. From there one gets ideas and sees an architecture unfolding that can be attempted at the more specialized levels of Q Developer, especially the /dev agent, such as the insight by Christian Bonzelet in his article below.

Supercharging the Amazon Q Developer Dev Agent

CHAT COMMANDS

Chat commands are agents within the chat interface that go off and do more detailed actions. They enable the accelerating of your whole SDLC.

/dev = helps implement new functionality, new features. Uses all the project files as context including those not open. Gives complex complex plan and detailed answers.
/transform = update the language version of a project.
/test = generate unit tests for your project.
/review = reviews your code for security vulnerability and code quality.
/doc = generate README’s for your project.
/clear = clears the session / conversation.

/help = Get info on using Amazon Q, explains Q functionality.

HIGHLIGHT CODE

Highlight a Section of code.
Right click, Choose ‘Amazon Q’.
Then >

Explain = Code is explained in natural language.
Refactor = Improve the code in different ways.
Fix = Debug the code.
Generate Tests = Create unit tests.
Optimize = Enhance the performance of the code.
Send to Prompt = Copies the highlighted code to the chat panel and then you can ask questions about it. ‘Insert code’ inserts the new code into the file, replacing the original code.

INLINE CHAT

Inline Chat enables you to interact with Amazon Q within the code editor. You can ask questions, receive debugging assistance and other code suggestions, right next to your code, in real-time. In VS-code the shortcut to Inline Chat is (CTRL + I).

REFERENCES TO SOURCES

Amazon Q provides the references to the answers it gives. The sources section is a list of sources that can be expanded at the bottom of a response. This is important to see copyright information to know if you want to use it in your production code. You can also find the references to sources at the bottom of the IDE window or in the reference log.

MANAGEMENT CONSOLE

Amazon Q integrated into the AWS Console. Your conversation context is maintained when you navigate to another place of the console or when you switch to another browser or to another tab. Example questions: “Show me all the Lambda functions I have in the us-east-1 region.”, “How many VPC peering connections do I have?”

You can ask Amazon Q Developer about your AWS resources in the management console - even in the mobile app.

From anywhere in the Management console, you can chat with Amazon Q to troubleshoot account and cost questions and create a support case using the context of your conversation. (If you have a plan higher than the Basic Support Plan.)

Amazon Q Developer Console-to-Code

Console-to-code helps you create IaC (Infrastructure as code) easily by generating IaC from recording your use of the console. You first use the console, and then Amazon Q suggests IaC scripts: CloudFormation, CDK or Terraform.

THE EXPLAINER

You can highlight code in AWS documentation and it will be explained with more detail, after enabling the ‘Explainer’.

Q DEVELOPER IN THE COMMAND LINE

After installing the ‘Amazon Q for command line’, you can interact with Amazon Q on the command line. You can give context to the conversation through the following context modifiers.

@git = Gives Amazon Q info on your git repository status.
@env = Gives Amazon Q info on your local shell environment variables.
@history = Shares your recent shell command history with Amazon Q.

CUSTOMIZATIONS

Customizations provide you with suggestions based on your own libraries, algorithms, styles, etc. It does this by connecting to your data source which is your codebase. For instance GitHub is a data source. You have to be sure and use good material. AWS will not use your content in any context to serve other customers.

Q DEVELOPER PLUGINS

Amazon Q Developer plugins can integrate with Third Party Monitoring tools and security platforms like Datadog and CloudZero. Amazon Q Developer doesn’t share information with the Third Party providers.

Q DEVELOPER IN AWS SERVICES

Amazon EC2 Instance Type integrated with Amazon Q allows one to choose EC2’s using natural language to specify the requirements. Amazon Q generative SQL can help generate SQL statements in Amazon Redshift from your prompts. You can use Amazon Q with Reachability Analyzer for network troubleshooting asking questions in a conversational format. In Amazon CodeCatalyst, Amazon Q can help draft solutions to issues, recommend tasks, create descriptions for a pull request and generate summaries of comments in a group of pull requests.

You can receive guidance using Amazon SageMaker with Amazon Q Developer, get sample code and debug and resolve errors. You can build data integration jobs with Amazon Q in AWS Glue. In AWS Cost Explorer, you can chat about your bills and costs for AWS. Amazon Q can retrieve cost data and explain why it exists, analyze cost trends giving metric time period and granularity, with groups and filters applied.

In Slack and Microsoft Teams, you can chat with Amazon Q Developer about your own account resources if those platforms are configured with AWS Chatbot.

Be sure and get more detailed information in the User Guide.

Amazon Q Developer User Guide

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

AWS GenAI Live!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️