Skip to content

Instantly share code, notes, and snippets.

@rsurjano
Created March 12, 2020 02:58
Show Gist options
  • Save rsurjano/cd34fc48e792b096b084c882f55ab631 to your computer and use it in GitHub Desktop.
Save rsurjano/cd34fc48e792b096b084c882f55ab631 to your computer and use it in GitHub Desktop.
S3 uploading
# PURGING S3 BUCKET
aws s3 rm s3://llamabus.pe --recursive
#UPLOADING TO S3
aws s3 sync ./packages/llamabus-front/public/ s3://llamabus.pe \
--exclude "*" \
--include "*.js" --acl "public-read" --cache-control "max-age=31536000" --content-encoding gzip \
--include "*.html" --acl "public-read" --cache-control "max-age=31536000" --content-encoding gzip \
--include "*.css" --acl "public-read" --cache-control "max-age=31536000" --content-encoding gzip \
--include "*.svg" --acl "public-read" --cache-control "max-age=31536000" --content-encoding gzip \
--include "*.json" --acl "public-read" --cache-control "max-age=31536000" --content-encoding gzip
# UPLOADING EVERYTHING ELSE
aws s3 sync ./packages/llamabus-front/public/ s3://llamabus.pe \
--include "*" --acl "public-read" \
--exclude "*.js" \
--exclude "*.html" \
--exclude "*.css" \
--exclude "*.svg" \
--exclude "*.json"
# INVALIDATING CLOUDFRONT
aws cloudfront create-invalidation --distribution-id E2XA0EWAIGSGOP --paths "/*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment