Run irb and execute the following commands with your bucket name and AWS secret key. You will need to save the encoded_policy string and the signature.
require 'base64'
require 'openssl'
require 'digest/sha1'
aws_secret_key = 'SKYBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXJoYL'