danielbeach / data-engineering-practice

Data Engineering Practice Problems
1.67k stars 468 forks source link

Exercise-3 "botocore.exceptions.NoCredentialsError: Unable to locate credentials" #18

Open floren007 opened 1 year ago

floren007 commented 1 year ago

When I try to print a list of files that have bucket s3, console says to me "botocore.exceptions.NoCredentialsError: Unable to locate credentials"

i write my code:

import boto3

def main(): s3= boto3.client('s3') paquete=s3.download_file('commoncrawl','crawl-data/CC-MAIN-2022-05/wet.paths.gz','wet.paths.gz') paquete.content

if name == "main": main()

InosRahul commented 1 year ago

https://commoncrawl.org/tag/s3/. Read the 2nd point. I think you have to authenticate with amazon s3 to access the data with boto3. Alternatively you can use https://data.commoncrawl.org/ to access the data

floren007 commented 1 year ago

Im on working on it, but i didnt find the the way to do it, another hint?


De: Rahul Soni @.> Enviado: domingo, 4 de junio de 2023 7:57 Para: danielbeach/data-engineering-practice @.> Cc: Florentino @.>; Author @.> Asunto: Re: [danielbeach/data-engineering-practice] Exercise-3 "botocore.exceptions.NoCredentialsError: Unable to locate credentials" (Issue #18)

https://commoncrawl.org/tag/s3/. Read the 2nd point. I think you have to authenticate with amazon s3 to access the data with boto3. Alternatively you can use https://data.commoncrawl.org/ to access the data

— Reply to this email directly, view it on GitHubhttps://github.com/danielbeach/data-engineering-practice/issues/18#issuecomment-1575410752, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM2BO3XL5PW2TIJYN4MWDQ3XJQPWNANCNFSM6AAAAAAYRXKSV4. You are receiving this because you authored the thread.Message ID: @.***>

floren007 commented 1 year ago

I mean i have no account on aws. So i cant authenticate


De: Rahul Soni @.> Enviado: domingo, 4 de junio de 2023 7:57 Para: danielbeach/data-engineering-practice @.> Cc: Florentino @.>; Author @.> Asunto: Re: [danielbeach/data-engineering-practice] Exercise-3 "botocore.exceptions.NoCredentialsError: Unable to locate credentials" (Issue #18)

https://commoncrawl.org/tag/s3/. Read the 2nd point. I think you have to authenticate with amazon s3 to access the data with boto3. Alternatively you can use https://data.commoncrawl.org/ to access the data

— Reply to this email directly, view it on GitHubhttps://github.com/danielbeach/data-engineering-practice/issues/18#issuecomment-1575410752, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM2BO3XL5PW2TIJYN4MWDQ3XJQPWNANCNFSM6AAAAAAYRXKSV4. You are receiving this because you authored the thread.Message ID: @.***>

InosRahul commented 1 year ago

I mean i have no account on aws. So i cant authenticate

Even I didn't have account on aws, so I didn't use the boto3 library. I got the data from this url https://data.commoncrawl.org/