Craft Assets on S3 bucket
You would need to build the complete URL to your file in order for it to work in your CSS.

See this answer:
Do Remote Assets (ie. S3) have file paths?

If the background-image is handled by something like a single or an entry template you could handle it with an inline style tag:

Regular Loading:
{% set image = entry.backgroundImage.first()%}

Eager-loaded:
{% set image = entry.backgroundImage[0] ?? null%}

Template:
&lt;main style="background-image: url({% if image %}{{image.url}}{% endif %});"&gt;&lt;/main&gt;