From the course: AWS for Developers: S3

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Binary object manipulation

Binary object manipulation - Amazon Web Services (AWS) Tutorial

From the course: AWS for Developers: S3

Start my 1-month free trial

Binary object manipulation

- [Instructor] We're going to start walking through manipulating binary objects in Python. It is important to note that as we get deeper in the SDK, there are multiple ways to do functions, and many more operations than we're going to even look at. I'm providing a snapshot of the SDK. The documentation, however, provides a complete picture. So let's jump back into our Python file, and we're going to create a few functions here real quick. The first one that we're going to create is upload file. This will allow us to do an upload. We're going to need the bucket, the directory, a file, our S3 resource, and then I'm going to pass in an S3 path with a default value of none. This way, if we ever want to, we can change the name of the file once we do the upload. First thing that we need to do is create a file path, and that's going to be hooked to our directory, plus a slash, plus our file. We need to do a remote path, and…

Contents