Upload to S3 via Shell Script Without Aws-Cli, Possible?
As the Title Says, Is It Possible to Upload to S3 via Shell Script Without Aws-Cli-Tools? If So, How? What I'm Trying to Do Is Read from a Txt File on S3...
As the title says, is it possible to upload to S3 via shell script without aws-cli-tools?
If so, how?
What I'm trying to do is read from a txt file on S3 (which is public, so no authentication is required).
But I want to be able to overwrite whatever is in the file (which is just a number).
Thanks in advance,
Fadi
2 Answers
Yes you can! You basically emulate the api calls the SDK would do for you through standard linux cmd utils.
Look at:
and/or
I use s3cmd which is a command line tool written in Python.
It uses the (restful) web APIs.
s3cmd put --recursives3cmd sync
would be the interesting bits:
Synchronize a directory tree to S3
s3cmd sync LOCAL_DIR s3://BUCKET[/PREFIX] or s3://BUCKET[/PREFIX] LOCAL_DIR