Skip to content

Latest commit

Β 

History

History
480 lines (345 loc) Β· 10.7 KB

File metadata and controls

480 lines (345 loc) Β· 10.7 KB

Interactive Mode Guide

Complete guide for using the AWS Knowledge Query interactive chat interface.

🎯 Overview

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

πŸš€ Starting Interactive Mode

venv/bin/python cli/interactive_aws.py

You'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: 

πŸ“– Commands

Asking Questions

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.

Changing Topics

πŸ’¬ You: topic reference_documentation
βœ… Topic changed to: reference_documentation

πŸ’¬ You: boto3 S3 upload

To see current topic:

πŸ’¬ You: topic
πŸ“Œ Current topic: general

Listing Topics

πŸ’¬ 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

Viewing AWS Regions

πŸ’¬ 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

Checking Service Availability

πŸ’¬ You: available AWS Lambda

πŸ” Checking availability for: AWS Lambda
βœ… Found availability data:
   [availability information]

Getting Help

πŸ’¬ 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

Exiting

πŸ’¬ You: quit
πŸ‘‹ Goodbye!

Or use: exit, q, or press Ctrl+C

πŸ’‘ Example Sessions

Session 1: Learning Lambda

πŸ’¬ 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!

Session 2: Troubleshooting

πŸ’¬ 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...]

Session 3: CDK Development

πŸ’¬ 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...]

🎯 Workflow Tips

Exploring a New Service

  1. Start with general topic
  2. Ask "What is [service]"
  3. Ask about best practices
  4. Switch to reference_documentation for API details
  5. 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

Debugging an Issue

  1. Switch to troubleshooting topic
  2. Paste the error message
  3. Ask follow-up questions
  4. 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

Learning CDK

  1. Start with cdk_docs for concepts
  2. Switch to cdk_constructs for examples
  3. 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

πŸ”§ Advanced Features

Quick Topic Switching

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

Combining Commands

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

Using with Shell History

Use your shell's history (↑ arrow) to repeat or modify previous queries:

πŸ’¬ You: Lambda best practices
[Results...]

πŸ’¬ You: ↑ (edit to) S3 best practices
[Results...]

πŸ› Troubleshooting

Connection Issues

Problem: Cannot connect to MCP server

Solution:

  • Check internet connection
  • Verify endpoint accessibility
  • Try again later

No Results

Problem: Search returns no results

Solutions:

  • Try a different topic
  • Rephrase your question
  • Be more specific
  • Use service names explicitly

Keyboard Interrupt

Problem: Accidentally pressed Ctrl+C

Solution: The assistant will exit gracefully. Just restart:

venv/bin/python cli/interactive_aws.py

Command Not Recognized

Problem: Command not working

Solution: Check available commands with:

πŸ’¬ You: help

Valid commands:

  • ask <question> (or just type the question)
  • topic <name>
  • topics
  • regions
  • available <service>
  • help
  • quit / exit

πŸ’‘ Tips & Best Practices

For Best Results

  1. Start broad, then narrow - Begin with general questions, then get specific
  2. Use the right topic - Switch topics based on what you need
  3. Be specific - Include service names and specific terms
  4. Try different phrasings - If no results, rephrase your question
  5. Use regions command - Check which regions support your service

Keyboard Shortcuts

  • ↑/↓ arrows - Navigate command history
  • Ctrl+C - Exit (gracefully)
  • Ctrl+D - Exit (EOF)
  • Tab - (depends on your shell's autocomplete)

Efficient Exploration

  1. Use topics to see all categories
  2. Switch topics frequently as you explore
  3. Use regions to understand AWS global infrastructure
  4. Keep questions concise but specific

πŸ“Š Output Format

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...

================================================================================

πŸŽ“ Learning Paths

Beginner Path

πŸ’¬ You: What is AWS Lambda
πŸ’¬ You: Lambda getting started
πŸ’¬ You: How to create Lambda function
πŸ’¬ You: Lambda pricing

Intermediate Path

πŸ’¬ You: Lambda best practices
πŸ’¬ You: topic reference_documentation
πŸ’¬ You: boto3 Lambda invoke
πŸ’¬ You: topic cdk_constructs
πŸ’¬ You: Lambda CDK Python

Advanced Path

πŸ’¬ You: Lambda performance optimization
πŸ’¬ You: Lambda cold start reduction
πŸ’¬ You: Lambda VPC configuration
πŸ’¬ You: Lambda layers best practices

πŸ”— Related Guides


Happy exploring! πŸš€