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.
Solution: Scripted operation - Amazon Web Services (AWS) Tutorial
From the course: AWS for Developers: S3
Solution: Scripted operation
(upbeat music) - [Instructor] Now that you had a chance to work on your script, I'm going to show you a script that I wrote to meet the requirements for our challenge. This file is available in the exercise files for this chapter, but what I did was I executed this shbang on bin/bash, so I just went ahead and wrote a bash script for this. You see there the aws s3 mb command to make a new bucket. I then created a file using an echo command that said this is from the challenge, stored that on my desktop in an s3 bucket called lil3.txt. I then synced those buckets, so in order to copy those files, I just used sync. That way I synced all the files, because there was already two there, and the challenge was just create a few files. So I went ahead and reused it. So that sync operation will sync it, and then when I do an ls on the fourth command there, it will show you all three files. Let's go ahead and execute this now.…
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)
Introducing the Amazon CLI2m 56s
-
(Locked)
Configuring the Amazon CLI2m 17s
-
(Locked)
Creating a bucket: mb3m 11s
-
(Locked)
Working with single files: cp, mv, rm5m 43s
-
(Locked)
Working with directories: ls, sync5m 51s
-
(Locked)
Presigned URLs2m 4s
-
(Locked)
Challenge: Scripted operation49s
-
(Locked)
Solution: Scripted operation1m 47s
-
(Locked)
-
-
-