AWS Security ChangesHomeSearch

AWS amazonq documentation change

Service: amazonq · 2025-05-01 · Documentation low

File: amazonq/latest/qdeveloper-ug/command-line-context-profiles.md

Summary

Added documentation for project rules, multi-project profiles, and role-based context management

Security assessment

The added content explains how to use project rules for security guidelines (e.g., restricting directory access, code security requirements), enhancing security documentation without addressing a specific vulnerability.

Diff

diff --git a/amazonq/latest/qdeveloper-ug/command-line-context-profiles.md b/amazonq/latest/qdeveloper-ug/command-line-context-profiles.md
index 99855ac1b..241a8ed62 100644
--- a//amazonq/latest/qdeveloper-ug/command-line-context-profiles.md
+++ b//amazonq/latest/qdeveloper-ug/command-line-context-profiles.md
@@ -140,0 +141,70 @@ Here are some common use cases for context profiles:
+### Using project rules
+
+Amazon Q supports project-level rules that can define security guidelines and restrictions. These rules are defined in Markdown files in the `.amazonq/rules` directory of your project.
+
+For example, you can create rules that specify:
+
+  * Which directories Amazon Q should avoid accessing
+
+  * Security requirements for generated code
+
+  * Coding standards and best practices
+
+
+
+
+Project rules can be added to your context using the `/context add` command:
+    
+    
+    q chat
+    > /context add .amazonq/rules/*.md
+    Added 3 path(s) to profile context.
+
+You can also add project rules to your global context to apply them across all profiles:
+    
+    
+    q chat
+    > /context add --global .amazonq/rules/security-standards.md
+    Added 1 path(s) to global context.
+
+For more information about creating and using project rules, see [Creating project rules for use with Amazon Q Developer chat](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/context-project-rules.html) in the IDE documentation.
+
+### Working with multiple projects
+
+If you work on multiple projects with different requirements, you can create a profile for each project:
+    
+    
+    q chat
+    > /profile create project-a
+    Created profile: project-a
+    > /context add ./project-a/README.md ./project-a/docs/*.md
+    Added 4 path(s) to profile context.
+    
+    > /profile create project-b
+    Created profile: project-b
+    > /context add ./project-b/README.md ./project-b/docs/*.md
+    Added 3 path(s) to profile context.
+
+You can then switch between profiles as you move between projects:
+    
+    
+    q chat
+    > /profile project-a
+    Switched to profile: project-a
+
+### Different development roles
+
+You can create profiles for different roles you perform:
+    
+    
+    q chat
+    > /profile create backend-dev
+    Created profile: backend-dev
+    > /context add backend-standards.md api-docs/*.md
+    Added 4 path(s) to profile context.
+    
+    > /profile create devops
+    Created profile: devops
+    > /context add infrastructure/*.md deployment-guides/*.md
+    Added 5 path(s) to profile context.
+