Skip to content

Instantly share code, notes, and snippets.

@kgorskowski
Created May 30, 2017 11:54
Show Gist options
  • Save kgorskowski/64e6bf4a70d45d29c359e4aea03edb96 to your computer and use it in GitHub Desktop.
Save kgorskowski/64e6bf4a70d45d29c359e4aea03edb96 to your computer and use it in GitHub Desktop.
flist=(`aws s3 ls s3://karsten-lambda-test --region eu-central-1 | awk '{print $4}'`)
for i in $flist; do aws s3 cp s3://karsten-lambda-test/$i . --region eu-central-1; guetzli --quality 90 $i $i.jpeg; mv $i.jpeg $i; aws s3 cp $i s3://karsten-lambda-test/$i --region eu-central-1; aws s3api put-object-tagging --bucket karsten-lambda-test --key $i --tagging "TagSet=[{Key=guetzli,Value=true}]" --region eu-central-1; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment