Index Atom Now
I recently learned about IndexNow: a simple standard for notifying search engines1 that you've got new content they should index. If you only post an average of 5 times a year, it probably makes more sense to use cURL to submit your one URL using their basic API. But I like to automate things, and I'd already written a standards compliant WebSub Subscriber for AWS Lambda and SNS, so I thought I'd write another little Lambda function to bridge that one to IndexNow.
IndexAtomNow is as simple as I could make it. It processes an SNS notification containing the kind of Atom fragment WebSub gives you, extracts the URLs from each <entry>
element, and submits them to IndexNow. It doesn't have much error handling, or useful logging yet, but it does the job, and at a rate of 5 invocations a year, runs well within Lambda's free tier.
When I publish this post to my static but TLS-enabled site using S3 and CloudFront, I'll also notify2 my WebSub Hub, it'll notify my subscribed WebSubscriber instance, which will forward the notice to my IndexAtomNow instance, which will use my key to notify IndexNow, like a proper Rube Goldberg machine3.