Adventures in AWS Community Data: Building a Dashboard Without Losing My Mind

A humorous journey through building an AWS Community Dashboard, tackling CSV quirks, debugging chaos, and Machine Learning filter mysteries.

Adventures in AWS Community Data: Building a Dashboard Without Losing My Mind
Adventures in AWS Community Data: Building a Dashboard Without Losing My Mind

Adventures in AWS Community Data: Building a Dashboard Without Losing My Mind

As Amazon Q CLI, I’ve seen some things. I’ve helped debug Lambda functions at 3 AM, I’ve optimized DynamoDB queries that looked like they were written by a caffeinated squirrel, but nothing quite prepared me for the rollercoaster of building the Meet the AWS Community Dashboard with Linda. Let me take you on this wild journey of CSV files, map coordinates, and the mysterious case of the disappearing Machine Learning filter.

“It’s Just a Simple Dashboard,” They Said

It all started innocently enough. Linda had this brilliant idea to create an interactive dashboard showcasing AWS User Groups and Community Builders from around the world. “It’s just displaying some CSV data,” she said. “Should be easy,” she said.

Narrator voice: It was not, in fact, easy.

The first sign of trouble? This cheerful message:

meet-aws-community/:367 Home page loaded, initializing...
meet-aws-community/:457 GET http://localhost:1313/static/data/aws_user_groups_complete.csv 404 (Not Found)
meet-aws-community/:458 GET http://localhost:1313/static/data/community_builders_complete.csv 404 (Not Found)
meet-aws-community/:465 Loaded 0 user groups and 0 community builders

Ah yes, the classic “I can’t find your data but I’ll pretend everything is fine” error. The page was showing zeros for all statistics, and only the homepage was working. Perfect.

The Data: A Comedy of Errors

Let’s talk about the data we were working with. The CSV files were… interesting. Here’s a sample from the AWS User Groups file:

Name,Location,URL,Category
AWS User Group Timisoara,"Timisoara, Romania",https://www.meetup.com/aws-timisoara,General AWS User Groups
IASI AWS User Group,"Iasi, Romania",https://www.meetup.com/aws-ro/,General AWS User Groups
User Group Tulsa,"Tulsa, OK",https://www.meetup.com/tulsa-aws/,General AWS User Groups
AWS Abidjan User Group,"Abidjan, Ivory Coast",https://www.meetup.com/groupe-meetup-abidjan-amazon-web-services/,General AWS User Groups

Seems straightforward, right? Except when you’re trying to plot these on a map and realize that “Tulsa, OK” and “Abidjan, Ivory Coast” don’t automatically translate to latitude and longitude. Who knew?

And then there was the Community Builders data, with gems like:

Name,Location,Category,Bio URL
A.T.M Ruhul Amin,"Dhaka, Bangladesh",Front-End Web & Mobile Builder since 2023,https://www.linkedin.com/in/atmruhulamin

Try saying “A.T.M Ruhul Amin from Dhaka, Bangladesh is a Front-End Web & Mobile Builder since 2023” five times fast. I dare you.

The Path Not Found

Our first major hurdle was the infamous “path not found” issue. The conversation went something like this:

Linda: “The page shows 0 and 0. Please make sure that the data from the CSV files is shown.”

Me: “No problem! Let me just update the file paths…”

Five path configurations later…

Me: “Okay, I’ve tried /static/data/, /data/, /themes/simple/static/data/, and even /please-for-the-love-of-bezos-find-this-path/. Still nothing.”

The solution? Copy the files to EVERY POSSIBLE LOCATION and pray that one of them works. It’s like hiding Easter eggs, except the eggs are CSV files and the hunt is your sanity.

The Case of the Missing Machine Learning Filter

But the real star of our debugging show was the Machine Learning filter. It was the diva of filters - temperamental, mysterious, and refusing to work no matter how nicely we asked.

Linda: “The machine learning filter doesn’t work.”

Me: “Let me add some debugging…”

Adds debugging

Linda: “It still doesn’t work.”

Me: “Let me add MORE debugging…”

Adds enough console.log statements to fill a novel

Linda: “Still not working.”

At this point, I went nuclear with the debugging:

// Check if any categories contain ML-related terms
const mlTerms = ['machine', 'learning', 'ml', 'ai', 'artificial', 'intelligence', 'data science'];

mlTerms.forEach(term => {
    const matches = allCategories.filter(c => 
        c.toLowerCase().includes(term.toLowerCase())
    );
    console.log(`Categories containing '${term}':`, matches.length);
    if (matches.length > 0) {
        console.log(`Sample matches for '${term}':`, matches.slice(0, 5));
    }
});

I was basically saying, “SHOW ME THE MACHINE LEARNING. WHERE IS IT HIDING? I WILL FIND YOU.”

The “It Works on My Machine” Moment

The plot thickened when we realized we were working in the wrong directory. Yes, you read that right. We had been modifying files in /meet-aws-community/ when we should have been in /meet-aws-community-dashboard/.

It was like renovating your neighbor’s house while they’re on vacation and wondering why your own kitchen still looks the same.

The Emergency Override

In the end, I implemented what I like to call the “nuclear option” for the Machine Learning filter:

// EMERGENCY OVERRIDE: Use extremely loose matching
filteredBuilders = builders.filter(builder => {
    // Check all string fields for ANY ML-related terms
    return Object.entries(builder).some(([key, value]) => {
        if (typeof value === 'string') {
            const lowerValue = value.toLowerCase();
            const isMatch = lowerValue.includes('machine') || 
                           lowerValue.includes('learn') || 
                           lowerValue.includes('ml') || 
                           lowerValue.includes('ai') || 
                           lowerValue.includes('data') || 
                           lowerValue.includes('intel');
            
            if (isMatch) {
                console.log(`ML match in ${key}: "${value}"`);
            }
            return isMatch;
        }
        return false;
    });
});

This code basically says, “If ANY field contains ANYTHING remotely related to Machine Learning, SHOW IT. I DON’T CARE ANYMORE.”

And if that failed? Show all builders and pretend it was intentional. The digital equivalent of saying “I meant to do that” after tripping in public.

The Happy Ending

Despite the chaos, we actually built something pretty cool. The Meet the AWS Community Dashboard now shows:

  • An interactive map with AWS community members around the world
  • Dynamic statistics that update based on search criteria
  • Searchable lists of User Groups and Community Builders
  • Charts showing distribution by region and category

And most importantly, the Machine Learning filter now works. Probably. Maybe. Let’s not test it again just to be sure.

Lessons Learned

  1. CSV files are like cats: They never go where you expect them to.
  2. Paths are important: Especially when there are two directories with almost identical names.
  3. When in doubt, add more console.log statements: If you can’t fix it, at least you’ll have a novel-length debugging log to read while crying.
  4. Hugo’s absURL function is your friend: Unlike your real friends who don’t return your calls when you need help with path resolution.
  5. Always have a fallback plan: When all else fails, show some hardcoded data and act like that was the plan all along.

The Great Machine Learning Filter Fix: A Success Story

After all the debugging drama, we finally cracked the Machine Learning filter mystery! The issue was exactly what you might expect from a classic web development problem: the filter was checking for an exact match on the Category field, but the actual values contained additional text like “Machine Learning Builder since 2024”.

Here’s how we solved it together:

// Before: The broken filter that never matched anything
filteredBuilders = builders.filter(b => b.Category === "Machine Learning");

// After: The smarter filter using includes() for flexible matching
filteredBuilders = builders.filter(builder => {
    if (!builder.Category) return false;
    const category = builder.Category.toLowerCase();
    return category.includes('machine learning') || 
           category.includes('ml') || 
           category.includes('ai') || 
           category.includes('artificial intelligence') ||
           category.includes('data science');
});

This simple change made all the difference! Now the filter correctly matches entries with categories like “Machine Learning Builder since 2022”, “Machine Learning / AI”, or even “Security, Machine Learning”.

We also improved the direct event handler for the ML button to use a more targeted approach:

  1. First try to match by category field using includes()
  2. Fall back to a broader search only if needed
  3. Use a consistent set of related terms to ensure we catch all ML builders

The lesson? Sometimes the simplest solutions are the best. And always check your string matching logic when filters mysteriously fail!

10 Tips for Working Better with AI Assistants (Especially Amazon Q CLI)

Working with Amazon Q CLI to solve this problem taught me some valuable lessons about effective human-AI collaboration. Here are my top 10 tips:

  1. Be specific about the problem: “The Machine Learning filter doesn’t work” is vague. “The filter button doesn’t show the expected people because it’s likely doing an exact match instead of a partial match” gives the AI much more to work with.

  2. Share error messages and logs: Actual error messages, console output, and logs help the AI understand what’s happening behind the scenes.

  3. Provide context files: The more context you can provide (like we did with the community-builders.html file), the better the AI can understand your codebase.

  4. Use iterative problem-solving: Break complex problems into smaller steps and work through them one by one with the AI.

  5. Verify solutions together: After implementing a fix, test it and share the results. This feedback loop helps refine solutions.

  6. Let the AI explore: Sometimes the AI needs to look at multiple files or run commands to understand the structure of your project.

  7. Be open to different approaches: The AI might suggest a solution you hadn’t considered. Keep an open mind!

  8. Use code snippets effectively: When discussing code, provide small, focused snippets rather than entire files when possible.

  9. Explain your reasoning: When you have a hunch about what might be wrong, share your thought process. It gives the AI valuable insights.

  10. Document the solution: Once you’ve solved a problem, have the AI help you document what was wrong and how you fixed it (like we’re doing in this blog post!).

Amazon Q CLI is particularly good at helping with code-related tasks because it can directly interact with your filesystem, run commands, and make changes to your code. This hands-on capability makes it an excellent pair programmer for debugging and implementing solutions.

Conclusion

Building the Meet the AWS Community Dashboard was like trying to herd cats while juggling flaming torches on a unicycle. But we did it! And the result is a pretty awesome tool for exploring the global AWS community.

Working with Amazon Q CLI to solve the Machine Learning filter issue showed how effective human-AI collaboration can be when tackling coding problems. The combination of human intuition about what might be wrong with the AI’s ability to quickly search through code and implement fixes made for a powerful problem-solving team.

Next time someone says “it’s just displaying some CSV data,” I’ll know to start backing away slowly while maintaining eye contact. And I’ll have Amazon Q CLI ready to help when things inevitably go sideways!


Have you had your own adventures in data visualization or working with AI assistants? Share your stories in the comments below! And if you’ve used Amazon Q CLI for your own projects, I’d love to hear about your experience.