Skip to content

Instantly share code, notes, and snippets.

@jazlopez
Created February 20, 2019 22:17
Show Gist options
  • Save jazlopez/81615ca1deef65e81efe2a8b86804de3 to your computer and use it in GitHub Desktop.
Save jazlopez/81615ca1deef65e81efe2a8b86804de3 to your computer and use it in GitHub Desktop.
Upload files in directory to S3 bucket (localstack)
#!/usr/bin/bash
# Jaziel Lopez,
# Software Engineer
# function __localstack_put_object() {
#
# fn="localstack-s3-put-object"
#
# echo "Localstack, storing bucket objects... please wait...";
# echo ".............................................";
#
# [ $# -lt 2 ] && { echo "\n[ERROR] Required parameters not found\n\nUsage: $fn :path :bucket_name"; }
#
# [ $# -eq 2 ] && {
#
# aws --endpoint-url=http://localhost:4572 s3 cp $1 s3://"$2";
# }
# }
for f in $PWD/*.*; do echo "Processing $f file"&& localstack-s3-put-object $f 004 ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment