Complete guide for using the AWS Knowledge Query interactive chat interface.
The interactive mode (interactive_aws.py) provides a chat-style interface for exploring AWS documentation. Perfect for:
- Learning and exploration
- Trying different queries quickly
- Switching between topics easily
- Viewing AWS regions and availability
venv/bin/python cli/interactive_aws.pyYou'll see:
π Connecting to AWS Knowledge MCP Server...
β
Connected!
================================================================================
π€ AWS Knowledge Assistant - Interactive Mode
================================================================================
Commands:
ask <question> - Ask about AWS services
topic <name> - Change topic (current: general)
regions - List all AWS regions
available <service> - Check service availability
topics - Show available topics
help - Show this help
quit / exit - Exit the assistant
================================================================================
π¬ You:
You can ask questions in two ways:
1. Direct (no command needed):
π¬ You: How to create a Lambda function
2. Using the ask command:
π¬ You: ask Lambda best practices
Both work the same way. The assistant will search using the current topic.
π¬ You: topic reference_documentation
β
Topic changed to: reference_documentation
π¬ You: boto3 S3 upload
To see current topic:
π¬ You: topic
π Current topic: general
π¬ You: topics
π Available Topics:
β’ general - Best practices, architecture
β’ reference_documentation - API/SDK/CLI docs
β’ troubleshooting - Error messages, debugging
β’ cdk_docs - CDK concepts
β’ cdk_constructs - CDK code examples
β’ cloudformation - CloudFormation templates
β’ current_awareness - New features
β’ amplify_docs - Amplify framework
π¬ You: regions
π Fetching AWS regions...
π AWS Regions:
β’ us-east-1 - US East (N. Virginia)
β’ us-east-2 - US East (Ohio)
β’ us-west-1 - US West (N. California)
β’ us-west-2 - US West (Oregon)
β’ eu-west-1 - Europe (Ireland)
β’ eu-central-1 - Europe (Frankfurt)
β’ ap-southeast-1 - Asia Pacific (Singapore)
β’ ap-northeast-1 - Asia Pacific (Tokyo)
β’ ap-south-1 - Asia Pacific (Mumbai)
β’ sa-east-1 - South America (SΓ£o Paulo)
... and 23 more regions
π¬ You: available AWS Lambda
π Checking availability for: AWS Lambda
β
Found availability data:
[availability information]
π¬ You: help
Commands:
ask <question> - Ask about AWS services
topic <name> - Change topic
regions - List all AWS regions
available <service> - Check service availability
topics - Show available topics
quit / exit - Exit
π¬ You: quit
π Goodbye!
Or use: exit, q, or press Ctrl+C
π¬ You: What is Lambda
π Searching for: What is Lambda
Topic: general
================================================================================
π RESULTS
================================================================================
1. AWS Lambda - Overview
π https://docs.aws.amazon.com/lambda/...
π AWS Lambda is a serverless compute service...
2. Getting Started with Lambda
π https://docs.aws.amazon.com/lambda/...
π Create your first Lambda function...
================================================================================
π¬ You: Lambda best practices
π Searching for: Lambda best practices
Topic: general
[Results displayed...]
π¬ You: topic reference_documentation
β
Topic changed to: reference_documentation
π¬ You: boto3 Lambda invoke
π Searching for: boto3 Lambda invoke
Topic: reference_documentation
[Results displayed...]
π¬ You: quit
π Goodbye!
π¬ You: topic troubleshooting
β
Topic changed to: troubleshooting
π¬ You: Lambda timeout error
π Searching for: Lambda timeout error
Topic: troubleshooting
================================================================================
π RESULTS
================================================================================
1. Troubleshooting Lambda Timeouts
π https://docs.aws.amazon.com/lambda/...
π Lambda functions have a maximum execution time...
[More results...]
π¬ You: S3 access denied
π Searching for: S3 access denied
Topic: troubleshooting
[Results displayed...]
π¬ You: topic cdk_constructs
β
Topic changed to: cdk_constructs
π¬ You: Lambda function CDK Python
π Searching for: Lambda function CDK Python
Topic: cdk_constructs
================================================================================
π RESULTS
================================================================================
1. Lambda Function Construct - Python
π https://docs.aws.amazon.com/cdk/...
π from aws_cdk import aws_lambda as lambda_...
[Code examples displayed...]
π¬ You: API Gateway Lambda CDK
[Results displayed...]
π¬ You: regions
π Fetching AWS regions...
[Regions displayed...]
- Start with general topic
- Ask "What is [service]"
- Ask about best practices
- Switch to reference_documentation for API details
- Switch to cdk_constructs for code examples
Example:
π¬ You: What is DynamoDB
π¬ You: DynamoDB best practices
π¬ You: topic reference_documentation
π¬ You: boto3 DynamoDB PutItem
π¬ You: topic cdk_constructs
π¬ You: DynamoDB table CDK Python
- Switch to troubleshooting topic
- Paste the error message
- Ask follow-up questions
- Switch to reference_documentation for API details
Example:
π¬ You: topic troubleshooting
π¬ You: Lambda timeout error
π¬ You: How to increase Lambda timeout
π¬ You: topic reference_documentation
π¬ You: Lambda timeout configuration
- Start with cdk_docs for concepts
- Switch to cdk_constructs for examples
- Ask about specific constructs
Example:
π¬ You: topic cdk_docs
π¬ You: CDK getting started
π¬ You: CDK stack construct
π¬ You: topic cdk_constructs
π¬ You: Lambda function CDK Python
π¬ You: S3 bucket CDK TypeScript
You can switch topics and ask in one session:
π¬ You: topic troubleshooting
π¬ You: Lambda timeout
π¬ You: topic reference_documentation
π¬ You: boto3 Lambda configuration
π¬ You: topic cdk_constructs
π¬ You: Lambda CDK example
While you can't combine commands in one line, you can quickly execute them in sequence:
π¬ You: topics
π¬ You: topic cdk_constructs
π¬ You: Lambda CDK Python
Use your shell's history (β arrow) to repeat or modify previous queries:
π¬ You: Lambda best practices
[Results...]
π¬ You: β (edit to) S3 best practices
[Results...]
Problem: Cannot connect to MCP server
Solution:
- Check internet connection
- Verify endpoint accessibility
- Try again later
Problem: Search returns no results
Solutions:
- Try a different topic
- Rephrase your question
- Be more specific
- Use service names explicitly
Problem: Accidentally pressed Ctrl+C
Solution: The assistant will exit gracefully. Just restart:
venv/bin/python cli/interactive_aws.pyProblem: Command not working
Solution: Check available commands with:
π¬ You: help
Valid commands:
ask <question>(or just type the question)topic <name>topicsregionsavailable <service>helpquit/exit
- Start broad, then narrow - Begin with general questions, then get specific
- Use the right topic - Switch topics based on what you need
- Be specific - Include service names and specific terms
- Try different phrasings - If no results, rephrase your question
- Use regions command - Check which regions support your service
- β/β arrows - Navigate command history
- Ctrl+C - Exit (gracefully)
- Ctrl+D - Exit (EOF)
- Tab - (depends on your shell's autocomplete)
- Use
topicsto see all categories - Switch topics frequently as you explore
- Use
regionsto understand AWS global infrastructure - Keep questions concise but specific
Results are displayed in this format:
π Searching for: Your question
Topic: current_topic
================================================================================
π RESULTS
================================================================================
1. Document Title
π https://docs.aws.amazon.com/...
π Context snippet (first 250 characters)...
2. Another Document
π https://docs.aws.amazon.com/...
π More context...
3. Third Document
π https://docs.aws.amazon.com/...
π Additional context...
================================================================================
π¬ You: What is AWS Lambda
π¬ You: Lambda getting started
π¬ You: How to create Lambda function
π¬ You: Lambda pricing
π¬ You: Lambda best practices
π¬ You: topic reference_documentation
π¬ You: boto3 Lambda invoke
π¬ You: topic cdk_constructs
π¬ You: Lambda CDK Python
π¬ You: Lambda performance optimization
π¬ You: Lambda cold start reduction
π¬ You: Lambda VPC configuration
π¬ You: Lambda layers best practices
- CLI Guide - Command-line tool
- Web UI Guide - Web interface
- API Reference - Use in Python code
- Troubleshooting - Common issues
Happy exploring! π