Get the last modified object in bucket

Anju
Apr 12, 2023

--

aws s3api --profile <profile_name> list-objects-v2 --bucket <bucket_name>| jq  -r '.[] | max_by(.LastModified) | [.Key, .LastModified, .Size]|@csv'

--

--

Anju
Anju

Written by Anju

A DevOps engineer who loves automating everything (almost), exploring new places, and finding peace in nature. Always looking for the next adventure!

No responses yet