1 00:00:00,810 --> 00:00:03,870 So let's go into the Amazon S3 Console. 2 00:00:03,870 --> 00:00:06,500 And there we can view all our buckets 3 00:00:06,500 --> 00:00:08,230 and we can create our first bucket. 4 00:00:08,230 --> 00:00:10,830 So I'll go ahead and click on create buckets. 5 00:00:10,830 --> 00:00:13,090 Next we have to give our buckets a name. 6 00:00:13,090 --> 00:00:14,760 And the name has to be globally unique 7 00:00:14,760 --> 00:00:16,900 across all accounts in AWS. 8 00:00:16,900 --> 00:00:19,230 So, if I name my bucket test, 9 00:00:19,230 --> 00:00:21,760 even though there was no test bucket in my accounts. 10 00:00:21,760 --> 00:00:24,460 Scroll all the way down and click on create buckets. 11 00:00:24,460 --> 00:00:25,500 I'm going to get an error saying 12 00:00:25,500 --> 00:00:28,420 that the buckets with the same name already exists. 13 00:00:28,420 --> 00:00:30,500 So I must choose a name that's going 14 00:00:30,500 --> 00:00:32,543 to be globally unique in AWS. 15 00:00:32,543 --> 00:00:37,544 I can do a demos defined as demo-stephane-s3-bucket-2020. 16 00:00:37,940 --> 00:00:38,820 Who know, right? 17 00:00:38,820 --> 00:00:40,550 But this is good enough. 18 00:00:40,550 --> 00:00:41,690 Next you have to choose a region. 19 00:00:41,690 --> 00:00:43,600 So choose a region that's close to you, 20 00:00:43,600 --> 00:00:47,260 for me I'm going to choose EU(Ireland)eu-west-1 21 00:00:47,260 --> 00:00:49,480 but you have to choose a region for you buckets. 22 00:00:49,480 --> 00:00:52,460 But the Amazon S3 console is global. 23 00:00:52,460 --> 00:00:54,120 It does not require a region selection. 24 00:00:54,120 --> 00:00:55,870 So, don't mistake it. 25 00:00:55,870 --> 00:00:57,590 S3 is not a global service. 26 00:00:57,590 --> 00:00:59,330 It is a global console. 27 00:00:59,330 --> 00:01:03,340 But you need to select a region for your S3 buckets. 28 00:01:03,340 --> 00:01:04,540 Okay, great. 29 00:01:04,540 --> 00:01:06,210 Then I'm going to scroll down 30 00:01:06,210 --> 00:01:09,070 and we have the Block Public Access settings. 31 00:01:09,070 --> 00:01:10,375 For now, I'm going to keep them on 32 00:01:10,375 --> 00:01:12,180 and we'll discuss them when we go 33 00:01:12,180 --> 00:01:15,770 into defining our S3 bucket policies 34 00:01:15,770 --> 00:01:17,870 and some securities around the buckets. 35 00:01:17,870 --> 00:01:20,370 And so what I'll do is just skip these settings 36 00:01:20,370 --> 00:01:22,540 because we'll view versioning and so on later 37 00:01:22,540 --> 00:01:25,330 And then we'll click on create buckets. 38 00:01:25,330 --> 00:01:27,880 So our first bucket has been created. 39 00:01:27,880 --> 00:01:30,050 And now I can click on it 40 00:01:30,050 --> 00:01:32,550 and explore the S3 console together. 41 00:01:32,550 --> 00:01:35,750 So when we get there, we get to the buckets level view. 42 00:01:35,750 --> 00:01:38,530 And as we can see, we have objects, properties permissions, 43 00:01:38,530 --> 00:01:39,840 metrics, management, and access points. 44 00:01:39,840 --> 00:01:42,990 We'll view a lot of those in this section. 45 00:01:42,990 --> 00:01:45,930 But for now, what I want to do is to go ahead and create 46 00:01:45,930 --> 00:01:49,830 and upload our first objects in Amazon S3. 47 00:01:49,830 --> 00:01:53,460 So I'm going to click on upload and then add files. 48 00:01:53,460 --> 00:01:57,630 And I'm going to upload my file called coffee.Jpg 49 00:01:57,630 --> 00:01:59,230 is my first file. 50 00:01:59,230 --> 00:02:00,400 And I'm going to scroll down 51 00:02:00,400 --> 00:02:01,800 and look at the different settings we have. 52 00:02:01,800 --> 00:02:03,956 So, as we can see, we have a destination 53 00:02:03,956 --> 00:02:06,790 which is my buckets right here. 54 00:02:06,790 --> 00:02:07,810 And we can view the fact 55 00:02:07,810 --> 00:02:09,240 that the versioning for now is disabled. 56 00:02:09,240 --> 00:02:10,830 We'll talk about versioning later on. 57 00:02:10,830 --> 00:02:12,360 We can do other settings. 58 00:02:12,360 --> 00:02:14,840 And we could look at additional upload options. 59 00:02:14,840 --> 00:02:18,140 But for now let's keep it simple and just click on upload. 60 00:02:18,140 --> 00:02:19,820 We'll see a lot of these settings later on 61 00:02:19,820 --> 00:02:21,570 again in this section. 62 00:02:21,570 --> 00:02:24,160 Okay, so the object has been uploaded. 63 00:02:24,160 --> 00:02:27,380 And so if I click back on my S3 buckets 64 00:02:27,380 --> 00:02:30,330 I can see that the objects now shows the number one. 65 00:02:30,330 --> 00:02:32,220 So there's one object in my buckets. 66 00:02:32,220 --> 00:02:34,010 It's coffee.jpg file. 67 00:02:34,010 --> 00:02:37,160 And it has been uploaded just right now. 68 00:02:37,160 --> 00:02:37,993 Okay. 69 00:02:37,993 --> 00:02:40,530 So now let's open this file 70 00:02:40,530 --> 00:02:42,130 and have a look at some of his details. 71 00:02:42,130 --> 00:02:45,090 So, how about we try to open this file? 72 00:02:45,090 --> 00:02:47,730 So there are two ways to open a file in Amazon S3. 73 00:02:47,730 --> 00:02:49,970 The first one is to click on the object action 74 00:02:49,970 --> 00:02:51,540 and then open. 75 00:02:51,540 --> 00:02:54,020 And if we do so this opens a new tab. 76 00:02:54,020 --> 00:02:55,700 And this tab is showing us 77 00:02:55,700 --> 00:02:58,060 the coffee picture we are expecting. 78 00:02:58,060 --> 00:02:59,540 So this is great. 79 00:02:59,540 --> 00:03:02,240 The second way to open a file in Amazon S3 80 00:03:02,240 --> 00:03:05,680 is to use the public object URL which is right here. 81 00:03:05,680 --> 00:03:07,970 So if I copy this object URL, 82 00:03:07,970 --> 00:03:10,800 open the new tab and paste this URL, 83 00:03:10,800 --> 00:03:11,800 what do I find? 84 00:03:11,800 --> 00:03:14,320 I find that there is an access denied. 85 00:03:14,320 --> 00:03:16,760 So, this is a bit weird, right? 86 00:03:16,760 --> 00:03:18,670 Well, the idea is that, 87 00:03:18,670 --> 00:03:20,910 here we are able to access it, and here not. 88 00:03:20,910 --> 00:03:22,720 Why so? 89 00:03:22,720 --> 00:03:25,160 Well, in the third tab, so this tab, 90 00:03:25,160 --> 00:03:28,990 we are using the public URL of our objects. 91 00:03:28,990 --> 00:03:32,540 And it turns out that's our S3 buckets is not public. 92 00:03:32,540 --> 00:03:34,270 So right now this is not public. 93 00:03:34,270 --> 00:03:38,450 Therefore, when I try to access any URL on my buckets, 94 00:03:38,450 --> 00:03:40,400 it will not work and it gives me an access denied. 95 00:03:40,400 --> 00:03:42,870 It's because my bucket is not public. 96 00:03:42,870 --> 00:03:46,740 But, if I use the second URL, 97 00:03:46,740 --> 00:03:48,360 it looks similar to the first one. 98 00:03:48,360 --> 00:03:49,850 The first part is actually very similar. 99 00:03:49,850 --> 00:03:51,530 But the last part is really long. 100 00:03:51,530 --> 00:03:54,490 As you can see, this is a very long URL. 101 00:03:54,490 --> 00:03:56,590 This is called a pre-signed URL. 102 00:03:56,590 --> 00:03:58,940 And we'll learn about it in this section as well. 103 00:03:58,940 --> 00:04:00,810 And so using pre-signed URL, 104 00:04:00,810 --> 00:04:03,070 what I'm doing is that I'm giving AWS, 105 00:04:03,070 --> 00:04:04,960 my temporary credentials, 106 00:04:04,960 --> 00:04:08,250 to say, hey AWS, that I'm not just using the public URL, 107 00:04:08,250 --> 00:04:11,030 I'm also passing in my credentials, so this is me. 108 00:04:11,030 --> 00:04:13,510 And it was not who I am, so it's okay, cool. 109 00:04:13,510 --> 00:04:15,250 I can show you this coffee.jpg picture. 110 00:04:15,250 --> 00:04:19,399 This is what you can see it by doing this object action open 111 00:04:19,399 --> 00:04:22,630 which will generate a pre-signed URL, okay. 112 00:04:22,630 --> 00:04:24,600 So, back into our buckets, 113 00:04:24,600 --> 00:04:26,610 let's try to create a folder. 114 00:04:26,610 --> 00:04:29,323 For example, I'm going to create the images folder. 115 00:04:30,650 --> 00:04:33,140 And then I will create that folder. 116 00:04:33,140 --> 00:04:35,950 And then within that folder, but I can do, for example, 117 00:04:35,950 --> 00:04:37,560 is upload another file. 118 00:04:37,560 --> 00:04:42,560 I can add a file and upload my beach.jpg file for example, 119 00:04:43,790 --> 00:04:46,440 and then click on upload. 120 00:04:46,440 --> 00:04:48,340 And here we go, my file has been uploaded. 121 00:04:48,340 --> 00:04:51,620 So now if I navigate a little bit, my buckets 122 00:04:51,620 --> 00:04:54,260 as you can see, I'm into the roots of my buckets 123 00:04:54,260 --> 00:04:57,010 and then I'm into the key is named images. 124 00:04:57,010 --> 00:04:59,270 And within it I find my beach.jpg. 125 00:04:59,270 --> 00:05:01,250 And I could, if I wanted to open the beach.jpg 126 00:05:01,250 --> 00:05:03,220 the same way we did it from before. 127 00:05:03,220 --> 00:05:04,410 Okay, pretty good. 128 00:05:04,410 --> 00:05:07,970 Now finally, what we can do is go back one up, 129 00:05:07,970 --> 00:05:11,890 so we can see coffee.jpg and the folder images, 130 00:05:11,890 --> 00:05:14,140 click on this folder, delete, 131 00:05:14,140 --> 00:05:16,800 and then delete everything within that folder. 132 00:05:16,800 --> 00:05:18,560 As you can see, it is a permanent delete. 133 00:05:18,560 --> 00:05:21,170 So, it says typing permanently delete 134 00:05:21,170 --> 00:05:24,170 to delete the objects and the folder. 135 00:05:24,170 --> 00:05:25,160 So this has worked, 136 00:05:25,160 --> 00:05:25,993 this has been deleted. 137 00:05:25,993 --> 00:05:28,460 I can click on exit in the top right corner. 138 00:05:28,460 --> 00:05:29,370 And here we go. 139 00:05:29,370 --> 00:05:31,910 We've had our first introduction to Amazon is free 140 00:05:31,910 --> 00:05:33,720 in which we have created a buckets, 141 00:05:33,720 --> 00:05:35,860 uploaded a file , view that file 142 00:05:35,860 --> 00:05:38,850 and played a little bit with folders and deleting objects. 143 00:05:38,850 --> 00:05:40,020 So that's it for the soft intro. 144 00:05:40,020 --> 00:05:42,590 We'll do a lot more in the section, but I hope you liked it. 145 00:05:42,590 --> 00:05:45,070 And I will see you in the next section.