From the course: AWS for Developers: S3
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Solution: Java SDK operations - Amazon Web Services (AWS) Tutorial
From the course: AWS for Developers: S3
Solution: Java SDK operations
(punchy electronic music) - [Instructor] So now it's time for me to show you my solution to this exercise. Much like I did with the Python example, I used all of the functions we'd already created, and just kind of cascaded through our algorithm. So, we'll start on line 173. I create a new bucket, using that TRANSIENT_BUCKET_NAME. I upload the file F2 to that bucket. I then copy the file F1 from my primary bucket to the transient bucket. On line 176 I'm then going to call listFiles, and store them in a keys list. I'm going to put a output there to just let me know that now we're printing. And I'm going to call a method, print line, on each one of the keys. Then I'm going to call on each of the keys, print line. Then on line 179 I'm going to download a file. So, some of you may have seen an issue here on line 179 when you were downloading the file, if your download directory wasn't clean, because it can't overwrite the…
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 31s
-
(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)
-