LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Authorization problem on Amazon S3 with Boto in Gnome Terminal as opposed to SSH (http://www.linuxquestions.org/questions/linux-software-2/authorization-problem-on-amazon-s3-with-boto-in-gnome-terminal-as-opposed-to-ssh-917377/)

wichiff 12-06-2011 06:54 AM

Authorization problem on Amazon S3 with Boto in Gnome Terminal as opposed to SSH
 
I have a problem with Boto, the Amazon S3 library.
This is in ubuntu 11.04 with python-boto 1.9b-1ubuntu5.

I try this in Python:
Code:

    >>> import boto
    >>> s3=boto.connect_s3()
    >>> b=s3.get_bucket('b-uck.et.name')

This works when I ssh into the ubuntu machine.
It fails when I am logged into gnome session and it is not run with root privileges (after sudo su).

The error message we get is S3ResponseError: 403 Forbidden with "The request signature we calculated does not match the signature you provided. Check your key and signing method."

The credentials are given by way of environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

When I am root before starting python (with sudo su), the get_bucket() call succeeds.

Do you have an idea what could be wrong with my desktop ?


All times are GMT -5. The time now is 09:06 AM.