Idempotent at the byte level: if the existing file has an identical
articles payload, the original lastUpdated timestamp is preserved
and the file is left untouched. This keeps aws s3 sync (size+mtime)
from re-uploading news/articles-metadata.json on every prebuild rerun
when no articles actually changed.
Write metadata database to JSON file.
Idempotent at the byte level: if the existing file has an identical
articlespayload, the originallastUpdatedtimestamp is preserved and the file is left untouched. This keepsaws s3 sync(size+mtime) from re-uploadingnews/articles-metadata.jsonon every prebuild rerun when no articles actually changed.