2

I tried to access amazon Landsat S3 bucket with the following python code

import boto
import boto.s3.connection
from boto.s3.connection import S3Connection

access_key = <userid>
secret_key = <pwd>
conn = S3Connection(access_key, secret_key)

nasaNexBucket = conn.get_bucket("nasanex")

for key in nasaNexBucket.list():
    print key.name

and getting this down error. Can anyone help me how to access landsat s3?

" nasaNexBucket = conn.get_bucket("nasanex") File "C:\PROGRA~2\QGISWI~1\apps\Python27\lib\site-packages\boto\s3\connection.py", line 502, in get_bucket return self.head_bucket(bucket_name, headers=headers) File "C:\PROGRA~2\QGISWI~1\apps\Python27\lib\site-packages\boto\s3\connection.py", line 535, in head_bucket raise err S3ResponseError: S3ResponseError: 403 Forbidden "

  • You are not allowed to access the URL according to the 403 Forbidden. Stupid question, but are you passing correct credentials to the server? Or perhaps, does the server require any special headers or anything, or does it use IP filtering? I don't know much about the module being used, but those are usual hangups for me in .NET stuff. – Branco Apr 24 '15 at 15:41
  • Think you need metadata first see this python code github.com/landsat-pds/landsat_ingestor (recently updated) – Mapperz Apr 24 '15 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.