Multi-bucket access using temp AWS credentials#564
Open
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Preview of new doc page version]
Access workspace bucket data with temporary AWS credentials
When logged into the ADE, temporary s3 credentials can be issued using the maap-py function
maap.aws.workspace_bucket_credentials()This command issues a set of AWS credentials that grant full read/write access to your own user folder within the workspace bucket, as well as any additional S3 buckets your organization has been granted access to.
The response includes an
authorized_s3_pathsarray listing all S3 paths accessible with the returned credentials:s3://maap-ops-workspace/maap_user)1. Retrieve temporary credentials
2. Create a boto3 session from the credentials
Use the temporary credentials to create a boto3 session. This session can be used to interact with any of the buckets listed in
authorized_s3_paths.3. List objects in an authorized bucket
4. Download (GET) an object
5. Upload (PUT) an object
6. Working with an organization shared bucket
If your organization has been granted access to additional buckets, they appear as extra entries in
authorized_s3_paths. Use them the same way: