question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trouble connecting to S3

See original GitHub issue

I was recently trying to read content with acl-private from S3 and had trouble with dask.bag.read_text. Here are some of the step I took. In the end, I was still unable to connect. Note I’m using an IAM account, but I did verify separately that my account has S3 full access:

Example: The code below would raised a NoCredentials error. screen shot 2017-02-03 at 12 36 20 pm

import dask.bag as db
b = db.read_text('s3://xdata-breach-data/dumps/*.txt',
                 errors='ignore', 
                 blocksize=10000000)

In the case of the workers, I have a .aws/credentials file on each node. I was also able to verify that both boto and boto3 were able to find credentials:

import boto
print(boto.connect_s3()) # ----> no problem

import boto3
print(boto3.client('s3')) # ----> no problem

I configure via the following methods config file methods:

  • .boto
  • .aws/config
  • .aws/credentials
  • /etc/boto.cfg
  • environment variables in /etc/profile and .bashrc

I also attempted passing the credentials via read_text->storage_options. In this case I got TypeError: __init__() got multiple values for argument 'aws_secret_access_key'

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
martindurantcommented, Nov 22, 2018

The arguments provided in storage_options should match the ones that successfully list the files:

storage_options={'client_kwargs': {'endpoint_url':'https://os.zhdk.cloud.switch.ch'}, 'anon':True}
0reactions
martindurantcommented, Nov 26, 2018

Glad to hear!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot endpoint URL connection error in Amazon S3
Resolution · Confirm that you're using the correct AWS Region and Amazon S3 endpoint · Verify that your network can connect to the...
Read more >
AWS S3 CLI - Could not connect to the endpoint URL
first you use 'aws configure' then input the access key, and secret key, and the region ...
Read more >
How to Connect to Amazon S3 with FileZilla® Pro
Make sure you have a S3 key pair. You will need both the access key ID and the secret access key in order...
Read more >
Using an AWS VPC Endpoint for Access to Data in S3 from ...
For now, we will work with a bucket which is not publicly accessible. ... There, we see the details of our connected VPC...
Read more >
Connecting to Amazon S3 service - WinSCP
First, make sure your AWS user with S3 access permissions has an “Access key ID” created. You also have to know the “Secret...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found