Uploading static files (assets to cdn)

I want all asset links to point to my CDN when running the bench build command, so that later I can run aws s3 sync /home/frappe/frappe-bench/sites/assets/ s3://my-buckets/assets and avoid the need to deploy Nginx.

* ChatGPT suggests adding ‘cdn_host’ and ‘use_cdn’ keys in common_site_config.json - but that does not work for me.

How can I achieve this?