随時更新!! AWS S3 cli のよく使うコマンドまとめ

s3にあるオブジェクトの総量を見たい時

$ aws s3 ls --summarize --human-readable --recursive s3://<backet name>

---
Total Objects: 21887
   Total Size: 2.7 GiB

s3にディレクトリを同期

$ aws s3 sync <local path> s3://<s3 backet> --exact-timestamps 

reference from

http://www.task-notes.com/entry/20150904/1441335600 https://docs.aws.amazon.com/cli/latest/reference/s3/index.html