‫So let's go ahead
‫and practice S3 access logs.
‫And for this, I'm going to create an S3 access logs
‫to find V3 buckets.
‫And then I will go ahead and create that bucket.
‫So that bucket is going to be our logging bucket,
‫and I'm going to keep this open here.
‫And in another tab, I'm going to take one of my buckets
‫that I've created and then I'm going to enable the logging.
‫So I just took one bucket,
‫but whatever bucket you want for you really.
‫I will go on Properties
‫and then I will scroll down
‫and look for "Server access logging."
‫So we edit it,
‫and we are going to enable server access logging.
‫So as we can see when we do so,
‫the bucket policy will be updated
‫in the target buckets, okay?
‫So where we want to log.
‫So for the target bucket, we're going to browse Amazon S3
‫and then we choose the S3 access logs to find V3 buckets.
‫I save the change
‫and now my S3 server access logging is enabled.
‫So now what I can do is I can go to my objects,
‫I can click on this one,
‫I can maybe open it back into my bucket,
‫I can go in it and I can upload a file.
‫So add a file and it'll be for example, my beach.jpg.
‫So you can do a lot of things in your bucket,
‫and all of this is going generate activity.
‫And this activity is going to be logged
‫into your logging buckets.
‫Now, if I refresh, as you can see, nothing happens yet.
‫That's because it takes a little bit of time
‫for your access logs to go into your logging buckets.
‫But what we can do in the meantime
‫is have a look at the permissions.
‫Because when we enabled the server bucket,
‫so when we're right here, the server access logging,
‫when we enabled it,
‫it was saying that the bucket policy will be updated.
‫So let's verify that.
‫We can scroll down and we have the bucket policy right here.
‫And indeed, yes, the bucket policy was updated
‫to allow the logging service of Amazon S3
‫to put objects into these buckets.
‫So this is pretty good.
‫So now what we have to do
‫is go back into our buckets
‫and wait for the first logs to be sent.
‫So it took a couple of hours, but I just refreshed,
‫and in my bucket, I see a lot of files now, objects,
‫and these have been created directly for my access log.
‫So I can click on one of them and I can open it for example.
‫And in here, I'm able to see, well, what happened?
‫And this is quite hard to decipher, okay?
‫But it gives you the API call, the success rate,
‫who accessed it, what bucket it was,
‫at what time and the lot of information.
‫So, okay, that's for S3 access logs.
‫I hope you liked it, and I will see you in the next lecture.