Created
February 20, 2019 22:17
-
-
Save jazlopez/81615ca1deef65e81efe2a8b86804de3 to your computer and use it in GitHub Desktop.
Upload files in directory to S3 bucket (localstack)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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