# Saving a file to local path from an Amazon S3 bucket via URL

**URL:** <https://forum.inductiveautomation.com/t/saving-a-file-to-local-path-from-an-amazon-s3-bucket-via-url/38843>\
**Category:** Ignition\
**Tags:** scripting, ignition80\
**Created:** [September 18, 2020, 6:06pm UTC](https://forum.inductiveautomation.com/t/saving-a-file-to-local-path-from-an-amazon-s3-bucket-via-url/38843 "2020-09-18T18:06:57Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 18, 2020, 6:50pm UTC](https://forum.inductiveautomation.com/t/saving-a-file-to-local-path-from-an-amazon-s3-bucket-via-url/38843/2 "2020-09-18T18:50:35Z")

</div>

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:

```python
#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)

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/saving-a-file-to-local-path-from-an-amazon-s3-bucket-via-url/38843)._
