Closed Swarnitha-eluru closed 4 years ago
Hi @Swarnitha-eluru,
tabulator
uses boto3
under the hood so you can use various methods - https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html
For example, setting env vars should work:
import os
os.environ["AWS_ACCESS_KEY_ID"] = "<you_id>"
os.environ["AWS_SECRET_ACCESS_KEY"] = "<your_key>"
# use tabulator
okay my doubt was If a url was given from s3 ,that file has no public access.If I give those credentials can I read it? using this import os
os.environ["AWS_ACCESS_KEY_ID"] = "
@Swarnitha-eluru After providing credentials you should be able to access S3 based on those credentials permissions. If they can read private you will be able to read private
okay thank you.
Hi @roll ,its working .Thanks for your support.
I wrote a small snippet to read the file given from s3 bucket. from tabulator import Stream source='s3://bucket/data.csv' with Stream(source,headers=1) as stream: print(stream.read()) I gave the object url for the file which has public access ,I am able to read.If I gave the file which doesnot have public access and if the credentials are available.Then where should I pass them.I am facing the below error.![image](https://user-images.githubusercontent.com/46745717/88621171-5f085780-d0bd-11ea-916d-0768968b156f.png)
Is there a way to read the file from s3 bucket which dont have public access but the aws access key id and aws secret access key were available.Where to pass them to read the file?