cd ..

[ project / 05 ] · Serverless Bot · Personal Use

AutoCA.

Serverless bot on AWS Lambda that monitors Air Canada fares and fires a Discord alert the moment prices move — built for a trip I'm actually planning.

Node.jsAWS LambdaAmazon S3EventBridgeDiscord

in action

The interface

Architecture· animated architecture overview
1 / 3

click image to expand fullscreen

about the project

I'm planning a trip from Brazil to Vancouver and wanted to know the moment Air Canada fares moved. AutoCA is the result: a serverless Node.js bot that runs every day at 1 PM (Brazil time), pulls fares from the Ignav API for my target dates, and fires a Discord alert the instant the price changes by 5% or more in either direction.

The pipeline is straightforward by design. EventBridge Scheduler triggers a Lambda, which fetches round-trip fares for both date combinations, filters out anything with US layovers or self-transfers, and picks the cheapest valid itinerary. That price is compared against the last alerted value stored in S3 — if it moved enough, a Discord embed goes out with flight details, price delta and a direct booking link.

On days when nothing changed, the bot still posts a neutral status card so I know it ran without checking logs. Partial errors (a single search failing while others succeed) also get reported rather than silently swallowed. The alert message is written in Portuguese since it's a personal tool built for my own use.

The whole thing fits entirely within the AWS Lambda and S3 free tiers: zero infrastructure cost. State is a single JSON file in S3 — no database, no persistent compute, no server to maintain.

project.meta

type
Serverless Bot · Personal Use
stack
Node.js · AWS Lambda · Amazon S3 · EventBridge · Discord
source
repo

what it does

Key features

01

Price change alerts

Pings @everyone on Discord when a fare rises or drops ≥ 5%, with price delta, flight details and a direct Air Canada booking link embedded in the card.

02

Daily status card

Posts a neutral summary on no-change days so you always know the bot ran — no need to check CloudWatch logs.

03

Smart filtering

Drops US-layover itineraries, self-transfers, non-BRL fares and blocked departure dates before picking the cheapest valid fare. The US airport blocklist, blocked date and price ceiling are all set in config.js.

04

Single-file configuration

Target route, date ranges, price ceiling, stop limit and alert threshold all live in config.js — change trips[] to update which round-trips the bot monitors.

05

Partial error reporting

Discord notification if any individual search fails, not just total outages — no silent swallowing.

06

Zero infrastructure cost

Fits entirely within AWS Lambda and S3 free tiers. No server, no database, no keep-alive needed.

07

EventBridge Scheduler cron

Runs daily at 1 PM Brazil time via a fully managed EventBridge rule — no EC2, no cron job, no uptime concern.