DEV Community

Cover image for Data-Driven Project Analysis: Analyzing Trello Kanban Projects with AI on AWS Bedrock

Data-Driven Project Analysis: Analyzing Trello Kanban Projects with AI on AWS Bedrock

Introduction

Modern software projects often involve multiple distributed teams working on high-complexity initiatives, with frequent releases and ongoing production fixes. While tools like Kanban boards help organize tasks, epics, and workflows, they also generate large volumes of unstructured data in the form of comments, status changes, and timelines.
As the number of interdependent tasks and contributors grows, understanding the real state of a project, and identifying early risks or bottlenecks, becomes increasingly difficult. As a result, manual analysis is time-consuming and often subjective, limiting timely and objective decision-making.

In this article, I present a practical use case that leverages AWS services and generative AI to enhance project analysis and interpretation. By analyzing task metadata and detecting semantic patterns in comments (such as ambiguity, implicit dependencies, missing definitions, or scope creep) AI enables more objective insights, early warnings, and data-driven decision-making


Understanding Kanban Board and Trello

Kanban is a visual project management methodology that originated in Toyota’s manufacturing system. It focuses on limiting work in progress and enabling continuous delivery by representing work items across different stages of a workflow.

Trello is a widely used web-based project management tool that implements Kanban principles through boards, lists, and cards. Each card typically represents a task, feature, or user story, and includes not only a status but also descriptive text, comments, and historical changes over time.
While Kanban boards are primarily designed for human collaboration, they also generate a rich source of textual and contextual data that can be analyzed programmatically.


User Stories as a Data Structure

A well-defined user story usually follows a consistent structure:

  • Who: the requester (As a…)
  • What: the objective (I want to…)
  • Why: the purpose (So that…)
  • Acceptance Criteria: explicit conditions for completion

This structure is not only useful for aligning teams, it also provides a clear semantic pattern that can be leveraged by AI models. When tasks are written consistently, the model can more easily understand intent, scope, dependencies, and completion expectations.
In other words, writing better user stories improves both human understanding and machine interpretation, making it a best practice for data-driven project analysis.


AWS Bedrock and Amazon Nova

For this tutorial, we leverage Amazon’s generative AI services, which provide a variety of pre-trained foundation models accessible through a single, unified platform.
AWS Bedrock is a fully managed service that allows developers to build, deploy, and scale AI-powered applications without the overhead of managing infrastructure. It provides seamless access to state-of-the-art foundation models from leading AI providers, all through a simple API.
For our implementation, we use Amazon Nova, AWS’s family of foundation models designed for tasks such as text generation, analysis, and summarization. In particular, Nova Lite offers a balanced combination of ⚡️performance and 💰cost-efficiency, making it ideal for analyzing project data and generating actionable insights.
In the following sections, we will demonstrate how to implement this service in Python, showing how AI can be applied to extract meaningful insights from Kanban project data.


Reference Architecture

Before diving into the implementation details, it is useful to understand the overall architecture that supports this use case. The following reference architecture illustrates how project data flows from Trello through AWS services and into an AI-powered analysis pipeline.

The entire process is executed through an AWS Glue job implemented in Python, which orchestrates data extraction, transformation, AI inference, and report generation in a scalable and automated manner.

At a high level, the architecture ingests Kanban project data from Trello, enriches it with temporal and contextual metadata, applies semantic analysis using generative AI models on AWS Bedrock, and produces structured, human-readable reports for project stakeholders.


Core Components

(1). 📋Trello Integration Class

Connects to Trello boards via the Trello API
Retrieves boards, lists, and cards with enriched metadata
Calculates time-based metrics (e.g., days until due date)
Exports structured data to Amazon S3 in JSON format

(2). ✨AWS Bedrock Integration

Invokes the Amazon Nova model using custom prompts
Processes project datasets to generate semantic insights
Uses configurable inference parameters to balance cost and accuracy

(3).📊 Report Generation (MarkdownPDFReport)

Converts AI-generated markdown into professional PDF reports
Applies custom styling for readability and consistency
Supports tables, lists, and structured summaries

(4). Supporting Services

  • 🔐 AWS Secrets Manager: securely stores Trello API credentials
  • 🪣 Amazon S3: stores datasets, prompts, and generated reports
  • 📩 Amazon SES: distributes automated reports via email

Implementation Guide

The use case presented in this guide is based on a simulated Trello board representing a e-commerce software project. The board includes typical development activities such as feature implementation, backlog items, in-progress tasks, and delivery milestones, closely mirroring how Kanban is used in production environments.
This example is intentionally designed to resemble a realistic project scenario, allowing us to analyze both structured data (task metadata, statuses, due dates) and unstructured data (descriptions and comments). The following diagram illustrates the initial project setup and serves as the input for the implementation steps described in the next sections.


Prerequisites

Before running the solution, a few AWS and Trello prerequisites must be in place. These prerequisites ensure secure access to project data, proper execution of the Glue job, and automated report delivery.

(1). 🔑 Trello API credentials

To access Trello boards and cards programmatically, you need valid Trello API credentials, consisting of an API key and an access token.

Step 1: Obtain the API key

The API key can be generated from the Trello Power-Ups administration page:

https://trello.com/power-ups/admin
Enter fullscreen mode Exit fullscreen mode
Step 2: Generate the access token

Once you have the API key, you must authorize your application and generate a token using the following endpoint (replace {API_KEY} with your own key):

https://trello.com/1/authorize?expiration=never&name=MyApp&scope=read,write&response_type=token&key={API_KEY}
Enter fullscreen mode Exit fullscreen mode

This authorization flow grants read and write access to Trello resources and returns a token that will be used by the application to query boards, lists, cards, and comments. Both the API key and token should be treated as sensitive credentials.

(2). ⚙️ AWS IAM role

On the AWS side, an IAM role is required to execute the AWS Glue job and interact with the supporting services used in this solution.
The role must include permissions for:

  • AWS Glue (job execution)
  • Amazon S3 (data storage and retrieval)
  • AWS Secrets Manager (secure storage of Trello credentials)
  • Amazon Bedrock (AI model)
  • Amazon SES (email delivery)

A complete example IAM policy with the required permissions is provided in the project repository. You can attach this policy to the IAM role used by the Glue job to ensure the pipeline runs end to end without permission issues.

(3). 📩 Amazon SES configuration

Finally, Amazon Simple Email Service (SES) must be configured to enable automated report delivery.
This includes:

  • ☑️ Verifying at least one sender email address or domain (SES identities)
  • ☑️ Ensuring your AWS account has sufficient sending limits
  • ☑️ Confirming the SES region matches the region used by the Glue job

Once configured, SES will be used to send the generated PDF reports to stakeholders automatically as part of the pipeline execution.


Implementation Steps

The following steps describe the end-to-end implementation of the solution, from secure credential management to AI-driven analysis and automated report distribution.

🔐 Step 1: Configure Secrets Manager

Store your Trello credentials securely in AWS Secrets Manager and this avoids hardcoding sensitive information and follows AWS security best practices. For this reason the secret should contain the Trello API key and token in JSON format.


⚙️ Step 2: Set Up the AWS Glue Environment

For this tutorial, the solution is implemented using an AWS Glue Python notebook, which provides a fully managed, serverless environment for running data processing jobs. Therefore, the complete source code is available in the project repository, because in the following sections shighlights the most relevant implementation details and design decisions rather than providing a full code walkthrough.

If you find this tutorial helpful, feel free to leave a star ⭐️ and follow me to get notified about new articles. Your support helps me grow within the tech community and create more valuable content! 🚀

GitHub logo RominaElenaMendezEscobar / aws-trello-ai-tutorial

End-to-end AWS Glue pipeline for extracting Trello Kanban data, analyzing it with Amazon Bedrock, and generating automated PDF reports.

Buy Me A Coffee


🏷️ Data-Driven Project Analysis: Analyzing Trello Kanban Projects with AI on AWS Bedrock

Introduction

Modern software projects often involve multiple distributed teams working on high-complexity initiatives, with frequent releases and ongoing production fixes. While tools like Kanban boards help organize tasks, epics, and workflows, they also generate large volumes of unstructured data in the form of comments, status changes, and timelines As the number of interdependent tasks and contributors grows, understanding the real state of a project, and identifying early risks or bottlenecks, becomes increasingly difficult. Manual analysis is time-consuming and often subjective.

preview

In this repository, I present a practical use case that leverages AWS services and generative AI to enhance project analysis and interpretation. By analyzing task metadata and detecting semantic patterns in comments (such as ambiguity, implicit dependencies, missing definitions, or scope creep) AI enables more objective insights, early warnings, and data-driven decision-making


🗂️ Folder Structure

The repository…


📦 Step 2.1: Installing Additional Python Packages

AWS Glue comes with a predefined Python environment, but this solution requires additional libraries to interact with AWS services, process text, and generate reports.

The following directive installs the required dependencies at runtime:

Install required Python packages

%additional_python_modules boto3==1.34.34,botocore==1.34.34,markdown==3.5.2,beautifulsoup4==4.12.3,reportlab==4.0.8
Enter fullscreen mode Exit fullscreen mode

These packages are used for:

  • boto3 / botocore: AWS SDK for Python, used to interact with services such as S3, Secrets Manager, Bedrock, and SES
  • markdown: Converts AI-generated Markdown into HTML
  • beautifulsoup4: Parses and transforms HTML content before PDF generation
  • reportlab: Generates styled PDF documents programmatically Installing only the required dependencies helps keep the Glue job lightweight and efficient.

📋 Step 2.2: Trello Data Extraction Class

The Trello class encapsulates all interactions with the Trello REST API and is responsible for retrieving, enriching, and preparing project data for AI analysis.

Key input parameters

  • BUCKET_NAME: Target S3 bucket for exporting processed data
  • API_KEY / API_TOKEN: Trello credentials retrieved securely from Secrets Manager
  • S3: Helper class instance used to write data to Amazon S3

Dataset design considerations

Although Trello provides a large number of fields, the implementation intentionally selects a minimal but meaningful subset of columns:

self.DATAFRAME_COLUMNS = [
    'id', 'dueComplete', 'desc', 'listName', 'name',
    'start', 'checkItems', 'checkItemsChecked', 'due', 'time_to_due']
Enter fullscreen mode Exit fullscreen mode

This design choice offers several benefits:

  • Reduces token usage during AI inference (lower cost)
  • Avoids passing empty or unused fields
  • Improves model focus and processing efficiency

Temporal enrichment

The class automatically calculates the number of days remaining until each task’s due date (time_to_due). This temporal context helps the AI model reason about urgency, delays, and potential risks.
Finally, the data can be exported to Amazon S3 in CSV format or returned as filtered JSON, typically limited to tasks in To Do and Doing states.


🧩 Step 2.3: AWS Helper Classes (boto3 Abstractions)

To keep the AWS Glue notebook readable, modular, and maintainable, all AWS service interactions are encapsulated into small helper classes built on top of boto3.

aws_s3

Handles all Amazon S3 operations, including:

  • Reading prompt templates and input files
  • Writing intermediate datasets
  • Persisting generated PDF reports
  • Automatically partitioning outputs by execution date

aws_secrets_manager

Responsible for securely retrieving sensitive configuration from AWS Secrets Manager, in our use case is the Trello API credentials.

aws_ses

Manages email delivery workflows:

  • Reads the generated PDF report from S3
  • Renders an HTML email body (template stored in the repository)
  • Attaches the PDF report
  • Sends emails to configured recipients

🧠 Step 2.4: AWS Bedrock Integration and Inference Strategy

The AWSBedrock class manages the interaction with Amazon Bedrock, invoking the Amazon Nova Lite model to analyze Trello project data.

Model inputs

The model receives:

  1. A filtered dataset (JSON) containing only relevant tasks and fields
  2. A custom prompt defining the analysis objectives, expected insights, and report structure

Both the dataset and the prompt can be adjusted to fit different team practices or project types. The prompt used in this tutorial is provided in the repository as a reference example.

class AWSBedrock():
    def __init__(self,
PROMPT:str, 
DATASET: str, 
REGION:str="us-east-1",
MODEL_ID:str ="amazon.nova-lite-v1:0" ):
        self.prompt = PROMPT
        self.dataset = DATASET
        self.prompt_final = f"{self.prompt} {self.dataset}"
        self.region = REGION
        self.model_id =MODEL_ID

    def create_bedrock_client(self):
        bedrock = boto3.client(service_name='bedrock-runtime', region_name=self.region)
        return bedrock

    def get_payload(self):
        payload = {
        "messages": [
            {
                "role": "user",
                "content": [{"text": self.prompt_final}]
            }
        ],
        "inferenceConfig": {
            "max_new_tokens": 5000,
            "temperature": 0.4,
            "top_p": 0.9
        }
    }
        return payload

    def invoke_model(self):
        try:
            bedrock = self.create_bedrock_client()
            payload = self.get_payload()

            response = bedrock.invoke_model(
                modelId=self.model_id,
                body=json.dumps(payload)
            )

            response_body = json.loads(response['body'].read())
            data =response_body['output']['message']['content'][0]['text']
            return data
        except Exception as e:
             print(f"Error: {e}"
Enter fullscreen mode Exit fullscreen mode

Inference configuration

"inferenceConfig": {
    "max_new_tokens": 5000,
    "temperature": 0.4,
    "top_p": 0.9
}
Enter fullscreen mode Exit fullscreen mode
  • max_new_tokens (5000): Allows the model to generate detailed, structured reports
  • temperature (0.4): Ensures consistent and reliable analysis while preserving enough flexibility to detect patterns and nuances
  • top_p (0.9): Enables controlled diversity in model responses

A temperature of 0.4 was selected after iterative testing, as higher values introduced unnecessary variability, while lower values reduced the model’s ability to surface implicit risks and insights.
Before finalizing this configuration, multiple test runs were performed, refining both the dataset and the prompt to ensure the output aligned with the intended project analysis goals.

If you want to learn more about how these parameters work, I've included this article.


📄 Step 2.5: Report Generation and Distribution

The MarkdownPDFReport class converts AI-generated Markdown into a professional, styled PDF document.

 Input parameters

The class requires only:

  • Markdown text generated by the AI model
  • An optional output path (in-memory or file-based)

Key features

  • Custom heading hierarchies and typography
  • Styled tables and lists
  • Emoji-to-symbol mapping for visual status indicators
  • Fully customizable styles defined in internal methods

All visual styles are centralized and can be easily adapted to match organizational branding or reporting standards.

Once generated, the PDF is stored in 🪣 Amazon S3* and sent via 📩 email using the previously described SES class, the email HTML template used for embedding the report is also available in the repository and can be modified as needed.


📄 Example Output: Email and Report Preview

Below is an example of the report generated by the solution. The complete output consists of a six-page PDF, but for illustration purposes, the following screenshots show the cover page and a selection of summary tables used to highlight key project insights.


Conclusions

This article demonstrates how combining Kanban project data with generative AI can significantly enhance the way teams understand, communicate, and manage complex software projects. Beyond the technical implementation, several key insights and lessons emerged from this use case.

📉 Reducing Bias and Improving Decision-Making

One of the main benefits of this approach is the ability to reduce subjective bias in project analysis. By evaluating task metadata, timelines, and written communication through AI-driven semantic analysis, teams gain a more objective view of project status, risks, and bottlenecks.
This enables more focused stakeholder discussions and allows follow-up meetings to be based on concrete, data-driven insights rather than individual perceptions.

🗣️ Enhancing Stakeholder Communication

In projects with a large number of tasks and contributors, explaining delays or risks can be challenging. Automatically generated reports help translate complex project data into clear, structured summaries, making it easier to communicate issues, dependencies, and priorities to non-technical stakeholders and leadership teams.

🔄 Dataset and Tooling Flexibility

Although this example is based on Trello, the same approach can be applied to other project management tools such as Jira, Azure DevOps, Odoo, or similar platforms. By adapting the data extraction layer, teams can reuse the same analysis and reporting pipeline across different tools and project types.
Selecting only relevant fields remains critical, as passing unnecessary or empty data increases token usage without improving insight quality.

💬 Prompt Design as a Key Success Factor

Prompt engineering plays a central role in the quality of the generated insights. Providing better context—such as project goals, roadmap expectations, risks, or delivery constraints—helps the model produce more accurate and actionable conclusions.
During experimentation, iterative prompt refinement proved essential. In some cases, enforcing a strict output format (such as JSON) reduced the depth of the analysis, whereas allowing freer, unstructured responses resulted in richer conclusions. This highlights the importance of testing different prompt strategies rather than assuming a single optimal format.

📑 Output Formats and Performance Considerations

While this solution generates Markdown and converts it into a PDF report, alternative output formats such as JSON can also be produced. However, structured formats may negatively impact model performance if they overly constrain the response. Choosing the right output format depends on the downstream use case—human consumption, system integration, or further automation.

🧩 Model Selection Matters

Model choice significantly affects the quality of insights. Initial experiments using Amazon Titan did not produce sufficiently meaningful conclusions for this use case. After evaluating multiple options, Amazon Nova proved to be the best fit, offering a better balance between contextual understanding, analytical depth, and consistency.


Final Thoughts

AI should not replace project management practices, but it can act as a powerful decision-support layer, helping teams identify risks earlier, communicate more effectively, and focus discussions on what truly matters. With careful dataset selection, prompt design, and model evaluation, this approach can be adapted to a wide range of project environments and organizational needs.


📚References

Top comments (0)