2&>1

AWSとかGCPとかGolangとかとか

S3のバケットサイズをワンライナーで取得

きっちりスクリプトにするほどでもないコマンドは以下です。

aws s3 ls | awk '{print $3}' | xargs -I{} sh -c 'echo {}:$(aws s3 ls s3://{} --recursive --human-readable --summarize | tail -n1 )'

こんな感じで出力

aws-codestar-ap-northeast-1-363717127291: Total Size: 385 Bytes
aws-codestar-ap-northeast-1-363717127291-test-pipe: Total Size: 0 Bytes

以上