#!/bin/bash
#
# This script will compare the contents of 2 s3 buckets.
#
# Usage:
#  s3-compare BUCKET1 BUCKET2

source=$1
target=$2
diff -u <(aws s3 ls --recursive s3://$source/ | awk '{print $4,$3}') <(aws s3 ls --recursive s3://$target/ | awk '{print $4,$3}')
