https://dagster.io/ logo
#announcements
Title
# announcements
e

eamag

09/27/2019, 1:04 PM
I also catch
Copy code
ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
when I try to download a file from private bucket, I have creds in environment as usual. I can download it manually via
Copy code
import boto3
s3 = boto3.resource("s3")
s3.Bucket(bucket_name).download_file
though
Public files work ok, how should I actually setup creds then?
yep, if I create my own resource
Copy code
@resource
def mys3(_):
    return boto3.resource("s3")
everything is fine
a

alex

09/27/2019, 3:01 PM
what approach did you take that was not working?
e

eamag

09/27/2019, 3:14 PM
@alex like in airline_demo, dagster_aws, identical but private bucket
a

alex

09/27/2019, 4:10 PM
interesting - heres where we create the s3 session https://github.com/dagster-io/dagster/blob/master/python_modules/libraries/dagster-aws/dagster_aws/s3/utils.py#L5-L9 @max any idea why this wouldn't work for private Buckets?
m

max

09/27/2019, 4:12 PM
hmm, i think the session will have to be signed for a private bucket
yep, we should probably switch the default config value for the resource
@eamag if you use the
dagster_aws.s3.s3_resource
, you should be good if you set the config value
use_unsigned_session: false
👍 1