Fetches the latest post from each recommended blog's RSS/Atom feed daily. Outputs a single JSON file to your static site's S3 bucket, rendered client-side under "Je recommande ces blogs" on the Jekyll home page.
EventBridge (daily 06:15 UTC)
└─ Lambda (Node.js 22)
├─ Reads src/blogs.json (name, url, feedUrl per blog)
├─ Fetches + parses each feed (RSS or Atom)
├─ Writes about/data/blogs.json to website S3
└─ Invalidates CloudFront cache
- AWS CLI configured (
aws configure) - SAM CLI installed (
pip install aws-sam-cli)
sam build
sam deploy --guidedOn first deploy, SAM will prompt for:
| Parameter | Value |
|---|---|
WebsiteBucket |
Your website S3 bucket name |
DistributionId |
Your CloudFront distribution ID |
SAM saves your answers in samconfig.toml for subsequent deploys (sam deploy without --guided).
npm install
npm testsam build
sam local invoke BlogFeedsFunctionaws lambda invoke \
--region eu-west-3 \
--cli-read-timeout 0 \
--function-name $(sam list stack-outputs --stack-name blog-feeds --region eu-west-3 --output json | jq -r '.[] | select(.OutputKey=="FunctionName") | .OutputValue') \
/dev/stdoutEdit src/blogs.json — { name, url, feedUrl } — then redeploy (sam build && sam deploy).
{
"generated": "2026-07-30T06:15:00.000Z",
"blogs": [
{
"name": "Un Spicilège",
"url": "https://blogz.zaclys.com/un-spicilege/",
"latestPost": { "title": "Evil Dead Burn", "date": "2026-07-15T15:08:42.000Z", "link": "https://..." }
},
{ "name": "...", "url": "...", "latestPost": null }
]
}latestPost is null when the feed couldn't be fetched or parsed that day (logged as an error in CloudWatch) — e.g. a blog whose feed is proxied through follow.it (a Blogger newsletter redirect), which returns HTTP 400 to non-browser requests.
See PostTenebrasLire/_includes/home_blogs.html and javascript/recommended-blogs.js,
which fetch /about/data/blogs.json client-side (same pattern as blog-analytics's
chart-snippet.html).
| Resource | Cost |
|---|---|
| Lambda (1 run/day, ~10s, 256MB) | ~$0.00 |
| CF invalidation (1/day) | $0.00 |
| Total | ~$0 |