Search found 3 matches

by nerdherdwa
Thu Jun 29, 2023 11:20 pm America/New_York
Forum: Home
Question: An error occurred (403) when calling the HeadObject operation: Forbidden
Replies: 7

Re: An error occurred (403) when calling the HeadObject operation: Forbidden

Thanks Jack have tried that with the same resultant error though the stack trace was further enhanced with the following information botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden The above exception was the direct cause of the following exc...
by nerdherdwa
Wed Jun 28, 2023 10:13 pm America/New_York
Forum: Home
Question: An error occurred (403) when calling the HeadObject operation: Forbidden
Replies: 7

Re: An error occurred (403) when calling the HeadObject operation: Forbidden

jmcnelis same response to the previous attempts

botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden

what versions of python and boto3 are expected, currently running version 3.6.9 of python and boto3==1.16.56
botocore==1.19.63
by nerdherdwa
Wed Jun 28, 2023 1:10 am America/New_York
Forum: Home
Question: An error occurred (403) when calling the HeadObject operation: Forbidden
Replies: 7

An error occurred (403) when calling the HeadObject operation: Forbidden

import boto3 import requests user = 'someusername' password = 'somepassword url = 'https://archive.podaac.earthdata.nasa.gov/s3credentials' url = requests.get(url, allow_redirects=False).headers['Location'] creds = requests.get(url, auth=(user, password)).json() # creds returned containing sessionTo...