https://yourbucket.s3.eu-west-1.amazonaws.com/yourfile.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=some-aws-credential-to-identify-the-signer&X-Amz-Date=timestamp-of-generation&X-Amz-Expires=validity-from-generation-timestamp&X-Amz-Signature=4709da5a980e6abc4ab7284c1b6aa9e624f388e08f6a7609e28e5041a43e5dad&X-Amz-SignedHeaders=host

The above is an example of an S3 presigned url. Is there anyway to hide the bucket part of the presigned url or change it to a domain name in the presigned url.

to be
https://custom.domain.com/yourfile.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=some-aws-credential-to-identify-the-signer&X-Amz-Date=timestamp-of-generation&X-Amz-Expires=validity-from-generation-timestamp&X-Amz-Signature=4709da5a980e6abc4ab7284c1b6aa9e624f388e08f6a7609e28e5041a43e5dad&X-Amz-SignedHeaders=host

I tried changing the presigned url to a custom domain, but it doesn’t work.
I used S3 GetPreSignedUrlRequest Method to generate the presigned url by setting key, bucketname and expires

What I would like to know

  1. Is there a way to change the presigned url behaviur to not show the bucketname and region
    2 Are there any security risks in allowing users to view the bucketname and region in the presigned url?

Any suggestions would be much appreciated. Thanks

New contributor

jc18 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.