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

Solution: Scripted operation - Amazon Web Services (AWS) Tutorial

From the course: AWS for Developers: S3

Start my 1-month free trial

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.…

Contents