AWS Builder Center: Learn, Build and Connect with builders in the AWS community
AWS Builder Center is the official home for builders on AWS. Share and read what others are working on, follow people who inspire you, explore training and workshops, and find tools to support what you're building.
How to install Amazon Q Developer CLI on WSL2
Install Amazon Q Developer CLI on WSL2 and set up AWS Documentation MCP Server.
Install Amazon Q Developer CLI
As of May 12, 2025, Amazon Q Developer CLI is not directly supported on Windows.
Therefore, you need to install and use Amazon Q Developer CLI on WSL2.
https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html
While Amazon Q CLI doesn't have a native Windows version, you can use it on Windows through the Windows Subsystem for Linux (WSL). This provides a Linux environment running on Windows where you can install and use the Amazon Q CLI.
Please install Amazon Q Developer CLI using the following command.
curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us-east-1.amazonaws.com/latest/q-x86_64-linux.zip" -o "q.zip" unzip q.zip ./q/install.sh
After installation, please restart WSL2 once.
After restarting, run the "q doctor" command to check if there are any issues with dependencies.
Log in using the "q login" command.
You can use an AWS Builder ID (free) and a paid Pro license for login.
q doctor q login
Access the URL displayed after executing the "q login" command to authenticate.
After authentication is complete, you can start chatting with Amazon Q by running the "q chat" command.
q chat
Setting up AWS Documentation MCP Server
The configuration method for AWS Documentation MCP Server is described in the document below.
https://awslabs.github.io/mcp/servers/aws-documentation-mcp-server/
Run the following command to install the "uv" command and Python 3.12.
curl -LsSf https://astral.sh/uv/install.sh | sh uv python install 3.12
After completing the installation of the "uv" command, add the MCP server configuration.
For AWS Documentation MCP Server configuration, add the following JSON file as described in the documentation.
Please create the file at "~/.aws/amazonq/mcp.json".
{ "mcpServers": { "awslabs.aws-documentation-mcp-server": { "command": "uvx", "args": ["awslabs.aws-documentation-mcp-server@latest"], "env": { "FASTMCP_LOG_LEVEL": "ERROR" }, "disabled": false, "autoApprove": [] } } }
After completing the MCP server configuration, use the following command to chat.
q chat
If the configuration is successful, AWS documentation will be searched.
For example, if you search for CloudFront's SaaS Manager as shown below, it will search AWS documentation and provide answers as follows.
> Please explain about CloudFront SaaS Manager while citing the documentation.
I'll explain CloudFront SaaS Manager while citing the AWS documentation. Let me search for the relevant information first.
🛠️ Using tool: search_documentation from mcp server awslabsaws_documentation_mcp_server
⋮
● Running search_documentation with the param:
⋮ {
⋮ "arguments": {
⋮ "limit": 10,
⋮ "search_phrase": "CloudFront SaaS Manager"
⋮ },
⋮ "name": "search_documentation"
⋮ }
Allow this action? Use 't' to trust (always allow) this tool for the session. [y/n/t]:
> y
⋮
● Completed in 1.949s
Let me get more detailed information about CloudFront SaaS Manager:
🛠️ Using tool: read_documentation from mcp server awslabsaws_documentation_mcp_server
⋮
● Running read_documentation with the param:
⋮ {
⋮ "arguments": {
⋮ "max_length": 5000,
⋮ "url": "https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/saas-specific-logic-function-code.html"
⋮ },
⋮ "name": "read_documentation"
⋮ }
Based on the AWS documentation, I'll explain CloudFront SaaS Manager:
# CloudFront SaaS Manager Explained
CloudFront SaaS Manager is an AWS service that enables Software-as-a-Service (SaaS) providers and web administrators to
efficiently manage content delivery for multiple web applications through multi-tenant CloudFront distributions.
## Core Components
According to the AWS documentation, CloudFront SaaS Manager consists of three main components:
1. Multi-tenant distributions: These serve as blueprint configurations that specify shared settings for all distribution
tenants, including cache behaviors, security protections, and origins.
2. Distribution tenants: These inherit the multi-tenant distribution configuration and support individual domains or
subdomains. Each distribution tenant is the "front door" for viewers to access content.
3. Connection groups: These provide the CloudFront routing endpoint that serves content to viewers. Each distribution tenant
must be associated with a connection group to get the corresponding CloudFront routing endpoint.
## Key Benefits
As cited in the AWS documentation:
• "Reducing operational burden"
• "Reusable configurations for web admins and software providers to manage CloudFront distribution for multiple web
applications that deliver content to end users"
• "Enhanced integrations with other AWS services to deliver automated certificate management, unified security controls, and
hassle-free configuration control at scale"
• "Maintaining consistent resource patterns across your implementations"
• "Customizable origin and security settings to meet specific needs at the distribution tenant level"
• "Organize your distribution tenants into different tiers"
• "Sharing a common DNS configuration across multiple domains"
## How It Works
The AWS documentation explains the workflow:
1. Create a multi-tenant distribution with CloudFront configuring settings based on your content origin type
2. CloudFront creates a connection group by default (or you can create a custom one)
3. Create one or more distribution tenants that reference the multi-tenant distribution
4. Customize distribution tenant settings as needed (vanity domains, origin paths, etc.)
5. Update DNS records to route traffic to the distribution tenant
## Customization Options
Distribution tenants can be customized with:
• **Parameters**: Key-value pairs for placeholder values like origin domains or paths
• **AWS WAF web ACL (V2)**: Specify separate web ACLs for each tenant
• **Geographic restrictions**: Override geographic restrictions from the multi-tenant distribution
• **Invalidation paths**: Specify file paths to invalidate for specific tenants
• **Custom TLS certificates**: Use ACM certificates for specific tenants
• **Domain names**: Specify domain names at the tenant level
## Helper Functions
CloudFront SaaS Manager provides helper functions to retrieve connection group and distribution tenant values in CloudFront
functions:
• Connection group domain name retrieval: event.context.endpoint
• Distribution tenant ID retrieval: cf.distributionTenant.id
• Distribution tenant parameter retrieval: distributionTenant.parameters.get("key")
## Limitations
The documentation notes several features that aren't supported with multi-tenant distributions, including:
• Continuous deployment
• Origin access identity (OAI)
• Dedicated IP custom SSL support
• AWS WAF Classic (V1)
• Standard logging (legacy)
• Various TTL settings
Additionally, some settings like IPv6 and Anycast static IP lists must be configured at the connection group level rather
than in the multi-tenant distribution or distribution tenant.
In summary, CloudFront SaaS Manager provides a streamlined way for SaaS providers to manage content delivery across multiple
domains while sharing configuration and infrastructure, significantly reducing operational overhead while maintaining
customization flexibility.
This time we added the AWS Documentation MCP Server, but it is also possible to add MCP servers that users have created themselves.
https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-mcp-configuration.html
- Topics
- Machine Learning & AI
- Language
- English
Relevant content
- Accepted Answer
asked a year ago
asked a year ago
