
Mastering Amazon Q Developer: Part 1 - Crafting Prompts
In part 1 of the Mastering Amazon Q Developer series, explore tips for writing prompts that deliver accurate, useful results.
Will Matos
Amazon Employee
Published Feb 25, 2025
Last Modified Feb 28, 2025
Working with users of Amazon Q Developer, I've noticed a common pattern: the effectiveness of Amazon Q Developer often depends on how well they craft their prompts. In this first post of a multi-part series, I'll share practical tips and techniques I've gathered from helping users get better results from their Amazon Q Developer interactions.
Some of the most common patterns I notice are the following:
- Short and/or vague requests: "Add Docs", "Make this better", "Check this"
- Overly broad questions: "How do I use AWS?"


While Amazon Q Developer can work with these, and does provide helpful information and code, I've helped users achieve much better, more accurate results by teaching them a more structured approach.
So, what makes a good prompt? Let's start by examining the key components.
My colleague, Brooke Jamieson created a very robust blog post which covers in-depth tips that are applicable to prompt engineering with Amazon Q Developer as well. Therefore, I won't rehash some of the great points made in the post. However, I'll mention a few key points that help users get more out of Amazon Q Developer.
Let's look at an example where I want to get suggestions from Amazon Q Developer on how to deploy a containerized web application on AWS. A user may attempt a question like this:
Amazon Q Developer prompt:

When users start this way, they often need multiple follow-up prompts to get the information they need, or refine the response. Compare this to when you work with a new member of your team. Often, vague tasks and questions will produce vague or misdirected responses based on what that new team member knows. The same applies to Amazon Q Developer. If you don’t provide enough information, context, or background for the model to narrow down its response, you may not receive the response you expect, or the response will be broader than desired.
I guide users to improve their prompts by providing more context. For instance, here is a better prompt which provides a little more detail:
Amazon Q Developer Prompt:

This prompt is better because it offers a more complete set of details about the application architecture and asks for specific aspects of the deployment to be addressed.
To achieve an even better result, I guide users to be even more specific:
Amazon Q Developer prompt:
Response:


This prompt provides a real-world scenario with specific requirements, asks for a comprehensive solution, and specifies the desired output format. The result is a tailored response with all the information I requested in the expected format.
Through numerous customer interactions on advanced prompt engineering, I've identified several key elements that consistently produce better results. By incorporating these techniques into your prompts, you can unlock more accurate and helpful responses from Amazon Q Developer chat.
- Provide clear instructions: "Create a Lambda function that processes S3 events." rather than just "Help with Lambda"
- Include relevant context: "We're using Python 3.9 in a regulated environment ..." instead of a generic request
- Specify the desired input: Share error messages, code snippets, or configuration files to give the ai more to work with
- Clearly define the expected output: " ... Format as a Technical Requirements document using markdown markup. Output as a single markdown code-block." instead of just "Create a report."
- Vague or open-ended requests: "Make this better" or "Check this" are too broad.
- Missing key details: Requests without information about the project, tech stack, requirements, dependencies, etc.
- Unclear output formatting: Failing to specify the desired format (e.g. markdown, diagram notation, code blocks, etc.) or level of detail
Here is a template that allows you to provide the necessary components in a well-structured prompt:
Amazon Q Developer prompt:
In the next post, we'll explore leveraging context for powerful Interactions - where I'll share how I help users maintain context across multiple prompts for complex projects.
The most successful Amazon Q Developer users I work with are those who learn to craft clear, detailed prompts. By following these patterns and guidelines, you'll get more accurate, useful responses that better serve your needs.
Stay tuned for Part 2 of this series!
If you want to learn more, check out the Amazon Q Developer User Guide which contains lots of resources to help get you started.
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.