1 00:00:00,420 --> 00:00:01,920 ‫So let's talk about 2 00:00:01,920 --> 00:00:05,940 ‫user-defined object metadata and S3 object tags. 3 00:00:05,940 --> 00:00:08,040 ‫So when you create an objects, 4 00:00:08,040 --> 00:00:11,520 ‫when you upload an object, you can also assign metadata. 5 00:00:11,520 --> 00:00:15,240 ‫And metadata is just a fancy name for key-value pairs 6 00:00:15,240 --> 00:00:17,130 ‫attached to your objects. 7 00:00:17,130 --> 00:00:20,310 ‫So if you upload user-defined metadata, 8 00:00:20,310 --> 00:00:25,260 ‫you must have the name that begins with x-amz-meta- 9 00:00:25,260 --> 00:00:29,370 ‫because there is metadata that is generated by AWS. 10 00:00:29,370 --> 00:00:31,320 ‫So the metadata can be retrieved 11 00:00:31,320 --> 00:00:33,090 ‫while retrieving the object 12 00:00:33,090 --> 00:00:35,040 ‫and it gives you information about the object itself. 13 00:00:35,040 --> 00:00:38,340 ‫So the first two, for example, for this S3 object 14 00:00:38,340 --> 00:00:41,220 ‫is the Content-Length and the Content-Type 15 00:00:41,220 --> 00:00:44,430 ‫of 7.5 kilobytes and html. 16 00:00:44,430 --> 00:00:47,100 ‫This is provided by AWS. 17 00:00:47,100 --> 00:00:49,951 ‫And the x-amz-meta-origin: paris 18 00:00:49,951 --> 00:00:52,890 ‫is just something that you have defined yourself 19 00:00:52,890 --> 00:00:54,243 ‫for whatever reason. 20 00:00:55,080 --> 00:00:57,360 ‫Next, we have S3 object tags. 21 00:00:57,360 --> 00:00:58,560 ‫So this is more common 22 00:00:58,560 --> 00:01:01,770 ‫because this is tags as you've seen them in AWS. 23 00:01:01,770 --> 00:01:04,740 ‫There are key-value pairs for your objects in Amazon S3. 24 00:01:04,740 --> 00:01:07,140 ‫And the reason we have tags versus metadata 25 00:01:07,140 --> 00:01:09,600 ‫is that the tags can actually be used 26 00:01:09,600 --> 00:01:11,490 ‫for fine-grained permissions. 27 00:01:11,490 --> 00:01:14,670 ‫For example, to only give access to specific objects 28 00:01:14,670 --> 00:01:17,790 ‫with specific tags within AWS. 29 00:01:17,790 --> 00:01:19,680 ‫Or for analytics purposes. 30 00:01:19,680 --> 00:01:22,770 ‫For example, if you use a solution like S3 Analytics, 31 00:01:22,770 --> 00:01:25,380 ‫you can group your findings by tags. 32 00:01:25,380 --> 00:01:27,330 ‫So for example, for this S3 object, 33 00:01:27,330 --> 00:01:29,460 ‫we can have Project: Blue, 34 00:01:29,460 --> 00:01:32,880 ‫and PHI, personal health information, True. 35 00:01:32,880 --> 00:01:34,350 ‫There's just some information, 36 00:01:34,350 --> 00:01:36,840 ‫you may want to provide for your objects. 37 00:01:36,840 --> 00:01:38,370 ‫So the most important thing 38 00:01:38,370 --> 00:01:40,200 ‫I want you to remember out of this lecture 39 00:01:40,200 --> 00:01:42,990 ‫is that the metadata and the tags 40 00:01:42,990 --> 00:01:45,810 ‫are not searchable on Amazon S3. 41 00:01:45,810 --> 00:01:49,050 ‫You cannot filter by metadata, you cannot filter by tags. 42 00:01:49,050 --> 00:01:51,270 ‫That is just not possible. 43 00:01:51,270 --> 00:01:53,520 ‫So why do we want this in the first place 44 00:01:53,520 --> 00:01:57,330 ‫and how would we search objects onto our S3 buckets? 45 00:01:57,330 --> 00:02:00,180 ‫Well, if you do want to search your S3 buckets, 46 00:02:00,180 --> 00:02:03,420 ‫you must build an external index in a database, 47 00:02:03,420 --> 00:02:06,300 ‫such as DynamoDB, but it could be whatever you want. 48 00:02:06,300 --> 00:02:08,940 ‫And we'll see DB later on. 49 00:02:08,940 --> 00:02:11,670 ‫But you will put all that metadata 50 00:02:11,670 --> 00:02:16,170 ‫and all these tags into a searchable index in DynamoDB 51 00:02:16,170 --> 00:02:19,140 ‫and then you will perform your search on DynamoDB. 52 00:02:19,140 --> 00:02:21,720 ‫And the results of your search will be extracted 53 00:02:21,720 --> 00:02:23,970 ‫as objects on Amazon S3. 54 00:02:23,970 --> 00:02:25,410 ‫So it's a common exam question 55 00:02:25,410 --> 00:02:28,710 ‫and something you need to know about for this architecture. 56 00:02:28,710 --> 00:02:29,910 ‫Okay, that's it for this lecture. 57 00:02:29,910 --> 00:02:31,110 ‫I hope you liked it. 58 00:02:31,110 --> 00:02:33,060 ‫And I will see you in the next lecture.