AWS S3 Generating Logs in S3

Amir Mustafa
AWS in Plain English
3 min readSep 15, 2021

--

AWS S3: Generating Logs in S3 Bucket

For generating logs of the bucket, we can use this AWS S3 feature.

For holding logs of a bucket, we need to create a new S3 bucket.

Go to the AWS console → Search S3 Service → Create a new bucket

Write any bucket name of your choice. You can add keywords like logs in the bucket name for a better understanding.

eg. amir-server-logs-2021. Click Create bucket button.

So there will be two buckets — one main bucket and other log bucket.

Go to your main bucket → Click Property → Go to the Server access logging → Edit.

Here we write the name of the new bucket created in the below format:

s3://<bucketname>/logs

Any new activity will be logged in the new bucket.

Sample logs of S3 bucket

Note: It takes 30 to 60 seconds to reflect logs in the new bucket. You can also refer in the below video

Video

Conclusion

It is a good practice to enable logs and versioning of an S3 bucket before using them in projects.

In the next article, we will understand Replication in AWS S3.

Thank you for being till the end 🙌 . If you enjoyed this article or learned something new, support me by clicking the share button below to reach more people and/or give me a follow on Twitter to see some other tips, articles, and things I learn and share there.

--

--

JavaScript Specialist | Consultant | YouTuber 🎬. | AWS ☁️ | Docker 🐳 | Digital Nomad | Human. Connect with me on https://www.linkedin.com/in/amirmustafa1/