AWS Builder Center
Weekend Agent Challenge: Phoenix

Weekend Agent Challenge: Phoenix

The AI agent that reviews my GitHub portfolio every morning and tells me exactly what to fix

Cloud Engineer - AWS
The public repository here:  github.com/TanseerS/phoenix-ai 
The full demo video is here:  youtu.be/E1H0wdBvtQM 

Introduction / Purpose of the Agent

Every developer has a graveyard of repositories. Projects that started with three energetic weekends of commits and then went silent. Not because the idea was bad, but because nobody was watching. The project stopped talking, so we stopped listening.
For this challenge I built Phoenix, a personal AI agent whose whole job is to watch for me. Every day at a fixed time it wakes up on its own, looks at every repository on my GitHub account, gives each one a health score, asks Amazon Bedrock to explain what is going wrong, and emails me a report before I have even opened my laptop. There is no button to press and no dashboard I have to remember to visit. The report shows up on its own, and for each repository it hands me one thing to do that I can finish in under an hour.
This article walks through what Phoenix does, how I built it in a single day, the AWS services behind it, and the mistakes that cost me the most time. If you are new to AWS, I have explained each service and each new word as it appears, because a year ago I would have needed that too.
Here is a full run from the scheduled trigger firing to the report landing in my inbox:  youtu.be/E1H0wdBvtQM 

Vision & What the Agent Does / Problem agent solves

The problem Phoenix solves is quiet project decay. GitHub already stores every signal that tells you a project is dying. There are no commits for weeks. The tests are failing or there are no tests at all. The README has not been touched since the first day. There has never been a release. Any one of these is a warning sign, and GitHub shows all of them if you go looking. The catch is that nobody goes looking every single day across ten different repositories. A human forgets. An agent does not.
Phoenix runs unattended on a schedule. It is triggered by Amazon EventBridge Scheduler, which is an AWS service that runs your code on a timer. I set it with a cron expression, which is a small piece of text that describes a repeating time, and I told it to run once a day in the Asia/Kolkata timezone. No person is involved when a run happens. The timer fires, and everything after that is automatic.
When Phoenix wakes up, it does five things in order.
First it scans my repositories through the GitHub API. It skips forks and archived projects, sorts by most recently pushed, and takes the top ten so a single run stays fast. For each repository it collects real signals: commits in the last 30 days, open issues and pull requests, the result of the latest CI run (CI means continuous integration, the automation that runs your tests every time you push code), the date of the latest release, and how long the README is.
Second it scores each repository out of 100. This part is deliberately not AI. It is a plain, predictable function so the same repository always gets the same score from the same signals. The score is split across six categories.
Category
Points
What it rewards
Commit recency
25
A commit in the last few days
CI status
20
Tests that exist and are passing
README quality
15
A README with real content
Issue hygiene
15
Not letting open issues pile up
Release recency
15
Shipping something people can use
Commit volume
10
Steady activity over a month
Anything that loses points becomes a plain English flag, like "No commits in 77 days" or "README missing" or "No CI configured".
Third it sends all the scored data to Amazon Bedrock, which is the AWS service for calling large AI models. I used the Nova Lite model. In one request Phoenix gets back a short diagnosis for each repository, one next best action for each repository, and a portfolio level summary that names the single project that most deserves my attention today. This is the step that makes the report feel like advice from a senior engineer instead of a list of numbers.
Fourth it saves everything to a MySQL database so each run can be compared with the one before it. That history is what lets the email show a change like plus five or minus three next to a score.
Fifth it reports back to me as an email through Amazon SES.
From my side as the user, the whole experience is one email a day. The subject line already tells me the worst repository and my portfolio average, so I know the state of everything without opening the mail. Inside, repositories are sorted worst first, and each card carries the score, the change since yesterday, the flags, the AI diagnosis, and the one action to take.




What Triggers Phoenix to Run?

Phoenix is an always-on AI engineering agent that runs automatically every day at 2:00 AM using Amazon EventBridge Scheduler. The scheduler invokes an AWS Lambda function, which starts the complete repository analysis workflow without requiring any user interaction.
Because Phoenix is schedule-driven, it continuously monitors projects even while the developer is away, ensuring that no repository silently becomes abandoned.

For testing purpose the trigger was set to 9:57 AM UTC

What Does Phoenix Do on Its Own?

Once triggered, Phoenix autonomously performs the following tasks:
  1. Connects to the GitHub API using a secure Personal Access Token.
  1. Retrieves all configured repositories.
  1. Collects repository metrics, including:
  • Last commit date
  • Commit frequency
  • Open Issues
  • Open Pull Requests
  • GitHub Actions workflow status
  • Release history
  • Repository metadata
  • README availability
  1. Calculates a Project Health Score (0–100) based on repository activity and engineering metrics.
  1. Sends the collected project data to Amazon Bedrock (Nova) for intelligent analysis.
  1. Uses AI to identify:
  • Potential risks
  • Stalled development
  • Missing engineering practices
  • The most impactful next task
  1. Stores the analysis results in MySQL for historical tracking and future comparisons.
  1. Generates a daily project health report automatically.
Phoenix requires no manual intervention. It continuously evaluates project health and proactively recommends actions before projects become abandoned.

How Does Phoenix Report Back?

After completing its analysis, Phoenix automatically generates and delivers a comprehensive project report.
The report includes:
  • Overall Project Health Score
  • Repository Status
  • Key Issues Detected
  • AI-generated Engineering Insights
  • Recommended Next Action
Phoenix reports back through:
  • Amazon SES — Sends a beautifully formatted email containing the daily project health report.
  • MySQL — Stores historical project analysis for trend tracking and future comparisons.
By running automatically on a schedule, continuously analyzing repositories, and proactively delivering actionable insights, Phoenix acts as an autonomous engineering assistant that helps developers keep their projects healthy and prevents promising ideas from becoming abandoned.

How I Built It

I built Phoenix in one long day, and the order I built it in mattered more than anything else. I did the trigger first and the intelligence last. That sounds backwards, but it meant every feature I added afterwards could be tested inside a pipeline that already ran on its own.

Building the trigger first

Before writing any real logic, I deployed a Lambda function that did nothing but print "Phoenix run started" and the current time. Lambda is AWS's service for running code without managing a server. You upload your code, it runs when something invokes it, and you pay only for the time it runs. I put this empty function on an EventBridge schedule and waited for it to fire. Once I saw a log appear that I had not created by hand, I knew the always on part worked. Everything from there was just filling in the middle.

Image: The phoenix-agent Lambda function in the AWS console

Teaching Phoenix to read a repository

Next I wrote the GitHub connector using plain fetch calls, no heavy library. To talk to GitHub you need a personal access token, which is a secret string that proves who you are. This is where I hit my first real wall. My scan kept failing with this exact error:
GitHub API 401 on /user/repos: { "message": "Bad credentials" }
I was certain the token was wrong. It was not. The token was fine. The problem was how I was storing it. I had started with AWS Secrets Manager, a service for holding secrets, and my code cached the secret the first time it loaded. When I updated the secret with the real token, the already warm Lambda kept using the old placeholder value from memory. I lost about thirty minutes on a GitHub error that had nothing to do with GitHub.
The fix taught me a lesson about weekend projects: simple wins. I moved all my configuration into Lambda environment variables, which are values you set directly on the function. Editing them forces the function to restart with fresh values, so the caching problem disappeared on its own. For a personal agent, environment variables were the right call, and I said so honestly in the code.


The database decision that shaped everything

My first plan used DynamoDB, but I wanted real SQL history so I could compare scores day over day, so I switched to Amazon RDS for MySQL. RDS is AWS's managed database service. This switch created a classic trap that catches almost everyone the first time.
RDS lives inside a VPC, which is a private network inside AWS. If you place a Lambda inside that same private network so it can reach the database, the Lambda loses its connection to the public internet unless you add a NAT gateway, which is a paid piece of networking that costs real money every month. Phoenix needs the public internet, because it calls the GitHub API and Bedrock. So I made a deliberate tradeoff. I kept the Lambda outside the VPC and made the database publicly reachable, protected by a password. That is a demo choice, not something I would ship to production, and the Terraform in my repo says exactly that in a comment. Knowing why you broke a rule is more useful than pretending you followed it.

Giving Phoenix a brain with Bedrock

With scanning and scoring working, I wired in Amazon Bedrock. I used the Converse API, which is a simple way to send messages to any model without learning each model's own request format. Phoenix sends all ten scored repositories in a single call and asks for JSON back, so one request covers the whole portfolio. The system prompt tells the model to be specific and to never give generic advice like "write more tests", and to tie every recommendation to the actual signals.
The result immediately felt different from a plain report. Instead of "repo inactive", Phoenix now wrote things like this about a repository that had gone quiet:
This repository has been inactive for over two months and lacks recent commits, a README, and CI configuration. Next best action: Decide whether to archive or revive the repository. If reviving, create a README and set up a CI pipeline.

The Bedrock quota wall, and how I got past it

This was the hardest part of the whole build, and it had nothing to do with writing code. My AWS account is new, and testing the agent again and again burned through the daily token limit for Nova Lite. The exact error was:
bedrock: analysis failed: Too many tokens per day, please wait before trying again.
I tried switching the Bedrock region using an environment variable, since quotas are counted separately per region. It was not enough. So I fell back to a second AWS account and generated a long term Bedrock API key there. A Bedrock API key is just another way to prove who you are, and the AWS SDK picks it up automatically if you set it as a bearer token in an environment variable called AWS_BEARER_TOKEN_BEDROCK. This gave me a completely fresh quota from a different account.
That fix produced a brand new error, which turned out to be the most useful lesson of all:
Invocation of model ID amazon.nova-lite-v1:0 with on-demand throughput isn't supported.
Retry your request with the ID or ARN of an inference profile that contains this model.
In plain terms, Nova models in some regions cannot be called by their plain name. You have to call them through a cross region inference profile, which is a routing layer that spreads your requests across regions. The bare id amazon.nova-lite-v1:0 does not work, but us.amazon.nova-lite-v1:0 does. One string changed in one environment variable, and the entire pipeline lit up. Ten repositories scored, a real portfolio summary written, results saved, email sent, all in under seven seconds.
To stop burning quota while testing the plumbing, I also added a small switch called SKIP_BEDROCK. When it is set to true, Phoenix skips the AI step and runs everything else, so I could test the database and the email without spending tokens.

Two small bugs that cost real time

A MySQL connection pool keeps the Node.js event loop busy, which meant my Lambda would keep running until it timed out even after the work was done. The fix is one line: setting context.callbackWaitsForEmptyEventLoop to false, which tells Lambda it can finish as soon as the response is ready.
The other bug was my own fault. My first full run failed at the very last step with this:
db: logRun failed: Unknown column 'error_message' in 'field list'
My code was writing to a column called error_message, but the table had a column called error. The code and the database disagreed. A single ALTER TABLE to rename the column fixed it, and after that the log was completely clean.

Delivering the report

The last piece was the email. I used Amazon SES, the AWS service for sending mail. New SES accounts start in what is called sandbox mode, which means you can only send to addresses you have verified. Since Phoenix emails me at my own verified address, that limit did not matter at all. I built the report as a self contained HTML email with inline styles, because email clients are old fashioned and ignore most modern styling. Repositories are colored by score, red for low and green for healthy, and sorted worst first so the mail ends on good news.

Image: The verified SES identities, an email address showing Verified

AWS Services Used / Architecture Overview

Phoenix runs on five AWS services, each doing one clear job.
Amazon EventBridge Scheduler is the trigger. It fires once a day using a cron expression that runs in the Asia/Kolkata timezone, so there is never any UTC math to do in my head. This is the piece that makes Phoenix an agent rather than a script I have to launch.
AWS Lambda is the compute. A single function written in Node.js 22 on arm64 runs the entire pipeline from scan to email. No framework, just plain JavaScript modules.
Amazon Bedrock with the Nova Lite model is the intelligence. One Converse API call per run produces every diagnosis, every next best action, and the portfolio summary.
Amazon RDS for MySQL is the memory. It stores a row per repository per day in a table called project_scores, and a record of every run in a table called run_log. That history is what powers the day over day score changes in the email.
Amazon SES is the delivery. It sends the finished HTML report to my inbox.

Image: The Phoenix architecture diagram on AWS
The flow reads left to right. EventBridge Scheduler invokes the Lambda. The Lambda pulls repository data from the GitHub API and runs it through the health engine. The scored data goes to both MySQL for storage and Bedrock for analysis. The results come back together, and the final report leaves through SES to reach me.
The proof that all of this happens without me is in the trigger and the logs. The schedule shows its execution timezone and its next ten trigger dates. The CloudWatch log stream, which is where Lambda writes its output, shows a run that scanned 13 repositories, analyzed 10, and wrote one score line per repository, with no human involved at any point.

Image: The EventBridge Scheduler schedule showing its cron expression, execution timezone, and upcoming trigger dates

Image: The CloudWatch log events from a scheduled, unattended run, one score line per repository

Image: The project_scores table in MySQL with two days of history, day one before AI analysis and day two with full recommendations

Image: The run_log table showing successful runs with their repository counts

What I Learned

This challenge taught me more about running AI in production than any tutorial ever has.
The biggest lesson was that Bedrock quotas are counted per account, per model, and per region all at once. When one runs dry, switching region or switching to a fresh account both open a new bucket, but switching model to something like Nova Micro opens yet another bucket without leaving your account. I also learned the hard way that a Bedrock API key is only an authentication method, not a way around a quota, unless the key belongs to a different account entirely.
The second lesson was about inference profiles. I did not know these existed before this weekend. Some newer models simply refuse to be called by their plain name in certain regions and demand the cross region profile id instead. The error message told me exactly what to do, which reminded me to actually read errors instead of guessing.
The third lesson was one I thought I already knew but relearned in a new costume. The way Lambda and RDS handle networking shapes your entire architecture before you write a single line of business logic. Deciding where the Lambda sits, inside or outside the VPC, decided everything else that followed.
Two smaller habits stuck with me. EventBridge Scheduler supports timezones natively, which removed all timezone conversion from my thinking. And building the trigger first, then the data, then the intelligence, is now my default order for any agent I build. Get the thing running on its own with an empty body, then grow the body inside a shell that already works.

Link to App or Repo

All the source code, the Terraform that documents the deployment, and every screenshot from this article are in the public repository here:  github.com/TanseerS/phoenix-ai 
The full demo video is here:  youtu.be/E1H0wdBvtQM 

Conclusion

Yesterday Phoenix told me one of my repositories had been silent for 77 days and gently suggested I decide whether to archive it or bring it back to life. That was a decision I had been quietly avoiding for two months, and an agent that costs almost nothing to run surfaced it for me over breakfast. That is the whole idea behind an always on agent. The work happens while you are away, and the answer is waiting when you get back. The best tool really is the one you never have to open.

Contact

If you have questions about the build, or you are fighting your own Bedrock quota error and want to compare notes, reach me at  khantanseer43@gmail.com 
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article