‫So let's talk about
‫user-defined object metadata and S3 object tags.
‫So when you create an objects,
‫when you upload an object, you can also assign metadata.
‫And metadata is just a fancy name for key-value pairs
‫attached to your objects.
‫So if you upload user-defined metadata,
‫you must have the name that begins with x-amz-meta-
‫because there is metadata that is generated by AWS.
‫So the metadata can be retrieved
‫while retrieving the object
‫and it gives you information about the object itself.
‫So the first two, for example, for this S3 object
‫is the Content-Length and the Content-Type
‫of 7.5 kilobytes and html.
‫This is provided by AWS.
‫And the x-amz-meta-origin: paris
‫is just something that you have defined yourself
‫for whatever reason.
‫Next, we have S3 object tags.
‫So this is more common
‫because this is tags as you've seen them in AWS.
‫There are key-value pairs for your objects in Amazon S3.
‫And the reason we have tags versus metadata
‫is that the tags can actually be used
‫for fine-grained permissions.
‫For example, to only give access to specific objects
‫with specific tags within AWS.
‫Or for analytics purposes.
‫For example, if you use a solution like S3 Analytics,
‫you can group your findings by tags.
‫So for example, for this S3 object,
‫we can have Project: Blue,
‫and PHI, personal health information, True.
‫There's just some information,
‫you may want to provide for your objects.
‫So the most important thing
‫I want you to remember out of this lecture
‫is that the metadata and the tags
‫are not searchable on Amazon S3.
‫You cannot filter by metadata, you cannot filter by tags.
‫That is just not possible.
‫So why do we want this in the first place
‫and how would we search objects onto our S3 buckets?
‫Well, if you do want to search your S3 buckets,
‫you must build an external index in a database,
‫such as DynamoDB, but it could be whatever you want.
‫And we'll see DB later on.
‫But you will put all that metadata
‫and all these tags into a searchable index in DynamoDB
‫and then you will perform your search on DynamoDB.
‫And the results of your search will be extracted
‫as objects on Amazon S3.
‫So it's a common exam question
‫and something you need to know about for this architecture.
‫Okay, that's it for this lecture.
‫I hope you liked it.
‫And I will see you in the next lecture.