s3-bash – No newline the secret key file

September 14th, 2009

If you use the s3-bash utilities with Amazon’s S3 service, you’ll find that one of the parameters asks for a file that contains the secret key. There’s important thing to note about this file – it must contain just the secret key without a newline. To check this, listing the file with ls -l should show that the file is 40 bytes. If it’s 41, you’ve got a newline and it won’t work. If you don’t have a text editor handy that will do this for you, you can use the following command to output your secret key to a file without the newline:

echo SECRET_KEY_HERE|tr -d '\n' > secret-key-file

2 Responses to “s3-bash – No newline the secret key file”

  1. Neil Says:

    I remember this one got me for quite awhile once.

  2. Jstall Says:

    Thanks for this. I just happened to find this article while looking for something else related to s3-bash but I know this would have given me trouble!

Leave a Reply

Powered by WP Hashcash