Read/Write files on specific S3 accounts

Say I want to save a file to S3 using a specific account:

df.to_csv('s3://foo/bar/temp.csv')

where my accounts are listed in ~/.aws/credentials:

[default]
aws_access_key_id = XXXX
aws_secret_access_key = XXXX

[foo]
aws_access_key_id = XXXX
aws_secret_access_key = XXXX

[bar]
aws_access_key_id = XXXX
aws_secret_access_key = XXXX

What’s the best or recommended way to do this with Pandas 0.20.2?

Any way to use/specify what account to use when we have multiple of them?

Perhaps related: Does Pandas use boto or boto3?

Author: Fantashit

1 thought on “Read/Write files on specific S3 accounts

Comments are closed.