
Introduction
Amazon Q Developer is a generative artificial intelligence (AI) powered conversational assistant that can help you understand, build, extend, and operate AWS applications. You can ask questions about AWS architecture, your AWS resources, best practices, documentation, support, and more.
Context - how to customize solutions AI generates
Amazon Q context enables fine-tuning Amazon Q to generate solutions according to your specific needs.
This is how I use it.
Overall Context Structure
For the greatest flexibility, I manage contexts on three distinct levels:
- 🌍 Global
- 🏠 Local
- 💼 Business
🌍 Global Context
I use the main Global Context to instruct Amazon Q on my:
✅ General guidelines,
✅ Best practices,
✅ Personal development preferences.*
Since I mainly work with Internet of Things (IoT) solutions, I called my global context IoTGlobalAmazonQ.md
. As you can see below, it is not IoT-specific (at the moment).
As you can see in the screenshot above, I use the absolute path (/Users/lmtx/dev/IoTGlobalAmazonQ.md
) to ensure that every project uses the same Global Context.
This is how it looks:
|
|
I’m constantly fine-tuning this file; you can find the most recent version on my GitHub. Any comments and feedback are very welcome!
*) Yes, I do believe that personal development preferences are still relevant, even in the vibe coding age.
🏠 Local Context
I use the Local Context to instruct Amazon Q on project-specific implementation:
✅ AWS CLI profile,
✅ AWS default region,
✅ Particular directives.
I use dedicated AWS CLI profiles for every assignment. My customers are located all over the world (USA, Australia, Germany, etc.), so I need to instruct Q which region to use by default for a specific engagement.
Some engagements require a unique design and development approach - Local Context is where I put those instructions for Amazon Q.
As you can see in the screenshot above, I use a project-related path (LocalAmazonQ.md
), so Q searches the current directory for the Local Context.
This is how it looks*:
|
|
*) Since I do not want to share actual customer data, this is the Local Context I use for my website project.
💼 Business Context
I use the Business Context to instruct Amazon Q on project-specific requirements:
✅ Business goal,
✅ User experience,
✅ Functional requirements.
Sample:
|
|
In the Business Context, I define the business goal and the application-level requirements. I prefer to describe the backend infrastructure requirements using the Local Context and keep the Business Context user- and goal-oriented.
Summary
Let’s briefly summarize my approach; I use the:
1️⃣ Global Context to define the general guidelines and best practices.
2️⃣ Local Context to define project-specific technical details.
3️⃣ Business Context to define the functional requirements and user experience.
That clear separation allows me to focus on distinct areas when defining guidelines for Amazon Q.
In this post, I focused on explaining the foundations of Amazon Q customizations. There are more advanced methods, but this framework will for sure increase the quality of Amazon Q-generated solutions.
👉 How do you instruct AI to generate solutions tailored to your needs? Please use the feedback functionality to share your experience!