0

I am trying to connect amazon s3 bucket using python as follows

   import boto
   from boto.s3.connection import S3Connection
   from boto.s3.key import Key

   conn = S3Connection(settings.AWS_S3_ACCESS_KEY_ID, settings.AWS_S3_SECRET_ACCESS_KEY)
   pb = conn.get_bucket(settings.AWS_STORAGE_BUCKET_NAME)

but i am receiving the following error

S3ResponseError: 403 Forbidden

i followed the below link http://www.techchorus.net/writing-python-script-send-files-amazon-s3

Please help me to solve this.

Elango
  • 415
  • 3
  • 7
  • 18
  • are your access keys right? – maxymoo Jun 24 '15 at 06:50
  • Yes key is correct i connect using "CloudBerry Explorer for Amazon S3" tool. – Elango Jun 24 '15 at 06:56
  • hmm not sure then, maybe check out http://stackoverflow.com/questions/10854095/boto-exception-s3responseerror-s3responseerror-403-forbidden could be something to do with "SERVER TIME"? – maxymoo Jun 24 '15 at 07:02
  • It is likely an issue with access control. If you remove the validation part of the get_bucket, does it work? conn.get_bucket(settings.AWS_STORAGE_BUCKET_NAME, validate=False) . – cgseller Jun 24 '15 at 21:43
  • @cgseller Thank you now its connected. – Elango Jun 25 '15 at 11:00

0 Answers0