Skip to content

Instantly share code, notes, and snippets.

@HieronyM
Created September 23, 2020 08:34
Show Gist options
  • Select an option

  • Save HieronyM/a710d4c59044c797513403b8c0d7c65f to your computer and use it in GitHub Desktop.

Select an option

Save HieronyM/a710d4c59044c797513403b8c0d7c65f to your computer and use it in GitHub Desktop.
List s3 object that already moved to Glacier
aws s3api list-objects-v2 --bucket BUCKET_NAME --prefix folder1/folder2 --query "Contents[?StorageClass=='GLACIER']" --output text | awk '{print $2}' > glacier-objects.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment