Comments (3)
Could you please show how you pass your token to boto versus s3fs?
from s3fs.
Sure. After authenticating, with the authentication token:
- boto3:
- Identity id obtained by calling the get_id() method over the "cognito-identity" boto client, with the account id, identity pool id and login descriptor (( "cognito-idp..amazonaws.com/": )) as parameters, corresponding to the "IdentityId" key from the returned dict
- with the identity id, the credentials are fetched using, again, the cognito-identity client, method get_credentials_for_identity
- the returned object is finally used to define the credentials associated with a new botocore Session, encapsulated by a boto3 Session set as the boto3.DEFAULT_SESSION, from which the clients are instantiated from.
the sequence above is implemented by the streamlit_cognito_auth library, method Boto3SessionProvider.set_default_session()
- s3sf: the token is passed as an argument to the S3SFFileSystem using the token parameter
Please let me know whether the above is clear enough
from s3fs.
In the first flow, I don't see you handle a token at all.
Note that you can pass session : aiobotocore AioSession
to s3fs, if you know how to make one; and the rest should be passed via client or session kwargs. So you'll need to know what "define the credentials associated with a new botocore Session" is actually doing.
from s3fs.
Related Issues (20)
- Failed to check IAM role name HOT 2
- Access Denied when IAM policy give access (Read/Write/Listing) to only a prefix area HOT 14
- difficult to perform delete_object request instead of delete_objects using S3FileSystem HOT 7
- S3fs doesn't check again if file exists HOT 4
- Inconsistent recursive `put` behavior when running an identical command twice successively HOT 1
- open_async file is closed on arrival HOT 1
- set_session does not seem to be thread / jobs safe HOT 4
- Random XAmzContentSHA256Mismatch Errors HOT 6
- calling flush on s3fs fails HOT 2
- s3fs 2024.3.0 fails reading glob patterns through pandas HOT 12
- Question: is awscrt useful ? HOT 2
- Errors when installing s3fs on Sagemaker Studio HOT 1
- Why isn't Pathlib supported yet? HOT 1
- Working example of using Async/Await HOT 7
- Custom s3 compatible https endpoint not working, port forwarded to localhost works HOT 9
- How to Increase async httpconnection limit? HOT 7
- Does aioboto3 Support Authentication with EC2 IAM Roles? HOT 3
- upload function didn't recognize the file path having "[]". HOT 4
- How to upload a list of files from local fs to cloud s3 fs async? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from s3fs.