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.
Bucket manipulation - Amazon Web Services (AWS) Tutorial
From the course: AWS for Developers: S3
Bucket manipulation
- [Instructor] So just like we did with Python, now we're going to take a look at some of those bucket-level operations that we can use, that are most common to the s decay. Once again, return to our application class, and we're going to create a couple methods. So, the first one, will return a list of string objects, called listFiles. And we'll pass it a bucket. Create a new ArrayList. And then we'll do our try block. This time we're going to use the ListObjectsRequest. Once again, we'll use the builder and we'll pass it the bucket. Now, we're going to do the ListObjectsResponse. Call on s3 the listObjects command, pass it the request. And now on our response, we're going to look at the contents, and we'll call forEach on that. And I'm going to do a little lambda here on content.key. So that should build us a list of keys. We will copy and paste this catch block, and we'll return our keys when we are done. So…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Java: Basic setup4m 15s
-
(Locked)
Creating a bucket4m 45s
-
(Locked)
Binary object manipulation4m 38s
-
(Locked)
Bucket manipulation4m 37s
-
(Locked)
Bucket and file security2m 59s
-
(Locked)
Presigning URLs4m 40s
-
(Locked)
Deleting a bucket1m 58s
-
(Locked)
Challenge: Java SDK operations50s
-
(Locked)
Solution: Java SDK operations2m 15s
-
(Locked)
-