FAQs about Amazon Q Developer
This section provides answers to frequently asked questions about using Amazon Q Developer for code development.
What is Amazon Q Developer?
Amazon Q Developer is a powerful generative AI-powered service designed to accelerate code development tasks by providing intelligent code generation and recommendations. On April 30, 2024, Amazon CodeWhisperer became a part of Amazon Q Developer.
How do I access Amazon Q Developer?
Amazon Q Developer is available as part of the AWS Toolkits for Visual Studio Code and JetBrains IDEs, such as IntelliJ and PyCharm. To get started, install the latest AWS Toolkit version.
What programming languages does Amazon Q Developer support?
For Visual Studio Code and JetBrains IDEs, Amazon Q Developer supports Python, Java, JavaScript, TypeScript, C#, Go, Rust, PHP, Ruby, Kotlin, C, C++, Shell scripting, SQL, and Scala. Although this guide focuses on Python and Java for example purposes, the concepts are applicable to any supported programming language.
How can I provide context to Amazon Q Developer for better code generation?
Start with existing code, import relevant libraries, create classes and functions, or establish code skeletons. Use standard comment blocks for natural language prompts. Keep your script focused on specific objectives, and modularize distinct functionalities into separate scripts with relevant context. For more information, see Best coding practices with Amazon Q Developer.
What should I do if in-line code generation with Amazon Q Developer isn't accurate?
Review the context of the script, ensure libraries are present, and make sure that classes and functions relate to the new code. Modularize your code, and separate different classes and functions by their objective. Write clear and specific prompts or comments. If you're still uncertain about the code's accuracy and you can't proceed with it, start a chat with Amazon Q and send it the code snippet with instructions. For more information, see Troubleshooting code generation scenarios in Amazon Q Developer.
How can I use the Amazon Q Developer chat capability for code generation and troubleshooting?
Chat with Amazon Q to generate common functions, ask for recommendations, or explain code. If the initial response isn't satisfactory, experiment with different prompts and follow the provided URLs. Also, provide feedback to Amazon Q to help improve its future chat performance. Use the thumbs-up and thumbs-down icons to provide your feedback. For more information, see Chat examples.
What are some best practices for using Amazon Q Developer?
Provide relevant context, experiment, and iterate on prompts, review code suggestions before accepting them, use customization capabilities, and understand data privacy and content usage policies. For more information, see Best practices for code generation with Amazon Q Developer and Best practices for code recommendations with Amazon Q Developer.
Can I customize Amazon Q Developer to generate recommendations based on my own code?
Yes, use customizations, which is an advanced capability of Amazon Q Developer. With customizations, businesses can provide their own code repositories to enable Amazon Q Developer to recommend in-line code suggestions. For more information, see Advanced capabilities of Amazon Q Developer and Resources.