AWS Builder Center

Weekend AI Agent Challenge: Building an Always-on AI Airfare Tracker with AWS!

The Always on AI Airfare Tracker Agent automatically monitors flight prices across multiple departure dates and analyzes pricing trends using Amazon Bedrock. It delivers a daily email with the best available fares and an AI recommendation.

Vision & What the Agent Does
Finding the best time to book an international flight can save hundreds of dollars, but checking airfare prices every day is time-consuming and easy to forget. Traditionally, many travelers relied on travel agents to monitor fares over several weeks and recommend the best time to book.
The AI Airfare Tracker Agent automates this entire process. Once configured, it runs completely unattended. Every morning at 7:00 AM ET, Amazon EventBridge Scheduler triggers an AWS Lambda function that searches airfare prices across the next 30 days using SerpAPI's Google Flights engine. The results are then analyzed by Amazon Bedrock, which identifies pricing trends and recommends whether to BOOK NOW, CONTINUE MONITORING, or LIMITED DATA. 
Finally, the agent generates a professionally formatted HTML report and delivers it via Amazon SES. The email includes:
  • Lowest, highest, and average airfare across all searched dates
  • A table of the cheapest fare for each departure date, highlighting the best overall deal
  • An AI-generated booking recommendation based on the pricing analysis
From the user's perspective, the experience is simple: configure your trip once (for example, JFK → DEL, round trip, 14-day stay), deploy the solution, and let the agent do the rest.
 Every morning, you'll receive a concise airfare intelligence report in your inbox, eliminating the need to manually search for flights while ensuring you never miss a great fare.
How I Built It
I built this agent using Kiro IDE, which significantly accelerated development through its AI-assisted coding capabilities. The project originally started as an Amadeus API-based tracker but later pivoted to SerpAPI after Amadeus discontinued its free-tier API access.
Key Design Decisions
I originally planned to use the Amadeus API for flight data. However, during development I learned that Amadeus had discontinued its free-tier API offering and now provides only paid access. As a result, I switched to SerpAPI's Google Flights Test Plan, which allowed me to continue building the solution.
Challenges Encountered
  • SES emails landing in spam Sending email from a Gmail address through Amazon SES without proper SPF and DKIM configuration can negatively impact deliverability. For this prototype, a Gmail filter solved the issue. In production, I would use a custom domain with properly configured DNS records.
  • Local testing without environment variables Running sam local invoke without an env.json file produced confusing SES errors such as "Missing final '@domain'" because the required email environment variables were missing. Creating an explicit env.json file for local development resolved the issue immediately.
  • SerpAPI rate limits SerpAPI's free Test Plan provides 100 searches per month. A 30-day look-ahead executed daily would require approximately 900 searches per month. I documented the trade-off: reduce the search window when using the free tier or upgrade the SerpAPI plan for full functionality.
AWS Services Used
The following AWS services power the solution: 
  • AWS Lambda (Python 3.12)
  • Amazon EventBridge Scheduler
  • AWS Secrets Manager
  • Amazon Bedrock (Nova Lite)
  • Amazon SES
  • Amazon CloudWatch Logs
  • AWS SAM
 Architecture Overview
I used a custom Kiro skill to generate the architecture diagram for this application.

What I Learned
This project reinforced several valuable lessons:
  • Prompt engineering has limits. When deterministic behavior is required (such as always prioritizing preferred airlines), don't rely solely on an LLM to categorize data correctly. Instead, pre-process and structure the data in code, then provide the LLM with clear, pre-categorized input.
  • Be prepared to change course. I originally planned to use the Amadeus API but had to pivot to SerpAPI after changes to Amadeus' API offering. Designing the solution with modular components made the transition much smoother.
  • Kiro IDE significantly accelerated the migration. Switching from Amadeus to SerpAPI required updates across the Lambda function, dependencies, AWS SAM template, README, and test configuration. Having an AI coding partner that understood the entire codebase and could make consistent changes across multiple files turned what could have been hours of refactoring into a focused development session.
  • With serverless, external APIs often drive the cost—not AWS. At this scale, AWS Lambda, Amazon EventBridge Scheduler, and Amazon SES incur minimal costs. The primary cost driver is the number of SerpAPI searches. Making the flight search window configurable allows users to balance richer pricing insights against API usage and cost.
Screenshot/output
Here is an example of email delivered with the summary and recommendations:

Source Code
GitHub Repository
The repository contains the complete source code, an AWS SAM template for one-command deployment, and detailed documentation. Simply clone the repository, configure your SerpAPI key in AWS Secrets Manager, and deploy using:
  • sam build && sam deploy --guided
Thanks,
𝒢𝒾𝓇𝒾𝓈𝒽 ℬ𝒽𝒶𝓉𝒾𝒶
𝘈𝘞𝘚 𝘊𝘰𝘮𝘮𝘶𝘯𝘪𝘵𝘺 𝘉𝘶𝘪𝘭𝘥𝘦𝘳 | 𝘈𝘐 𝘌𝘯𝘨𝘪𝘯𝘦𝘦𝘳𝘪𝘯𝘨 𝘈𝘞𝘚 𝘊𝘦𝘳𝘵𝘪𝘧𝘪𝘦𝘥 𝘚𝘰𝘭𝘶𝘵𝘪𝘰𝘯 𝘈𝘳𝘤𝘩𝘪𝘵𝘦𝘤𝘵 𝘈𝘞𝘚 𝘊𝘦𝘳𝘵𝘪𝘧𝘪𝘦𝘥 𝘋𝘦𝘷𝘦𝘭𝘰𝘱𝘦𝘳 𝘈𝘴𝘴𝘰𝘤𝘪𝘢𝘵𝘦 𝘈𝘞𝘚 𝘊𝘦𝘳𝘵𝘪𝘧𝘪𝘦𝘥 𝘎𝘦𝘯𝘈𝘐 𝘗𝘳𝘢𝘤𝘵𝘪𝘵𝘪𝘰𝘯𝘦𝘳 𝘈𝘞𝘚 𝘊𝘦𝘳𝘵𝘪𝘧𝘪𝘦𝘥 𝘊𝘭𝘰𝘶𝘥 𝘗𝘳𝘢𝘤𝘵𝘪𝘵𝘪𝘰𝘯𝘦𝘳 𝘈𝘞𝘚 𝘊𝘭𝘰𝘶𝘥 𝘛𝘦𝘤𝘩𝘯𝘰𝘭𝘰𝘨𝘺 𝘌𝘯𝘵𝘩𝘶𝘴𝘪𝘢𝘴𝘵
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