I am writing bash script to upload key into a bucket. I want to create a key dynamically and upload its contents, which is obtained from processing the list. In boto ,I can do this using :
k = Key(bucket)
k.key = 'foobar'
k.set_contents_from_string('This is a test of S3')
How can I achieve the same in aws s3 using bash script? The aws s3 api method put object has --body parameter which accepts only blob values and does not allow me to upload string.