You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unable to download a folder from this S3 bucket: s3://cozy-auto-texture-sd-repo/stable-diffusion-v1-4/
Now this bucket needs to be public so I can distribute a repository to my users, and anyone needs to be able to access it. For some reason whenever I run the above code with that s3:// link, cloudpathlib gives the following error:
File "E:\Cozy-Auto-Texture-Files\venv\lib\site-packages\botocore\auth.py", line 418, in add_auth
raise NoCredentialsError()
botocore.exceptions.NoCredentialsError: Unable to locate credentials
The text was updated successfully, but these errors were encountered:
@torrinworx Like with boto3 directly, in order to access public resources anonymously you need to pass no_sign_request=True when you instantiate the S3Client (you can find examples here).
We'd take a PR that updates that authentication docs page to have an example accessing a public bucket so this is eaiser for other folks to find as well.
pjbull
changed the title
"NoCredentials" Error when trying to download a folder object from public access bucket on AWS S3.
Update docs: Use no_sign_request to fix "NoCredentials" Error when trying to access a public S3 bucket
Sep 14, 2022
I've outlined this issue in more depth here: https://stackoverflow.com/q/73708204/15739035
But essentially just using this simple code:
I'm unable to download a folder from this S3 bucket:
s3://cozy-auto-texture-sd-repo/stable-diffusion-v1-4/
Now this bucket needs to be public so I can distribute a repository to my users, and anyone needs to be able to access it. For some reason whenever I run the above code with that s3:// link,
cloudpathlib
gives the following error:The text was updated successfully, but these errors were encountered: