I happened across this while figuring out some clashing settings names.
I think (and hope, because it means I understand this and didn’t write absolute nonsense in the thread linked above) that if you remove these two lines:
DISCOURSE_S3_BUCKET: 'lc-xyz'
DISCOURSE_S3_BUCKET_NAME: 'lc-xyz'
Then you can set DISCOURSE_S3_CDN_URL
, and it will only be used for uploads, not assets.