You need to separately retrieve the content of the file via another HTTP request. Since your post is tagged 8.0.x, you can use system.net.httpClient(), which is much more ergonomic. Generally speaking, downloads are GET requests - so your hypothetical webdev endpoint would be something like this:
#request should be a GET to http://localhost:8088/data/webdev/${project}/${path}?filepath=${pathToS3}
s3Url = params["filepath"]
if s3Url is not None:
def downloadFile(response):
system.file.writeFile("path/to/some/file", response.body)
request = system.net.httpClient().getAsync(s3Url)
request.whenComplete(downloadFile)