diff --git a/devTools/docker/sync-s3-images.sh b/devTools/docker/sync-s3-images.sh index b2a8a06987a..d15f1e2399b 100755 --- a/devTools/docker/sync-s3-images.sh +++ b/devTools/docker/sync-s3-images.sh @@ -13,4 +13,12 @@ fi # for local development, it should be owid-image-upload/local-yourname # at least until we decide to instead host images locally, if ever -aws --endpoint=https://nyc3.digitaloceanspaces.com s3 sync s3://owid-image-upload/production/ s3://$IMAGE_HOSTING_BUCKET_PATH/ --acl public-read \ No newline at end of file +if ! grep -q 'profile owid-spaces' ~/.aws/config; then + echo 'Please configure your S3 credentials for profile owid-spaces:' + echo + echo ' aws configure --profile=owid-spaces' + echo + exit 1 +fi + +aws --profile=owid-spaces --endpoint=https://nyc3.digitaloceanspaces.com s3 sync s3://owid-image-upload/production/ s3://$IMAGE_HOSTING_BUCKET_PATH/ --acl public-read \ No newline at end of file