Skip to content

Accessing buckets in r#582

Open
HarshiniGirish wants to merge 3 commits into
MAAP-Project:developfrom
HarshiniGirish:bucket_r
Open

Accessing buckets in r#582
HarshiniGirish wants to merge 3 commits into
MAAP-Project:developfrom
HarshiniGirish:bucket_r

Conversation

@HarshiniGirish
Copy link
Copy Markdown
Collaborator

No description provided.

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -0,0 +1,544 @@
{
Copy link
Copy Markdown
Collaborator

@wildintellect wildintellect May 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should actually check, injecting the tokens into vsi calls might also work.

Also consider in the future using https://cran.r-project.org/web/packages/ConfigParser/index.html


Reply via ReviewNB

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this as an optional second path. The notebook now includes a GDAL/VSI environment injection approach, where the temporary access key, secret key, and session token are set for the active R session before opening /vsis3/ paths. I kept the AWS profile method as the main path and marked the VSI token injection method as something to test/confirm in the MAAP Hub environment.

@@ -0,0 +1,544 @@
{
Copy link
Copy Markdown
Collaborator

@wildintellect wildintellect May 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do if the file already exists, but just needs updated tokens


Reply via ReviewNB

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this section so the existing ~/.aws/credentials file is preserved. The notebook now updates only the selected profile block with refreshed temporary credentials, instead of overwriting the whole credentials file.

@@ -0,0 +1,544 @@
{
Copy link
Copy Markdown
Collaborator

@wildintellect wildintellect May 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mention those packages terra lasR , we should confirm if this works with stars and sf


Reply via ReviewNB

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this to explicitly mention terra and lasR. I also added a note that this workflow should be tested/confirmed with stars and sf, since their behavior depends on how they call GDAL for /vsis3/ access.

@wildintellect
Copy link
Copy Markdown
Collaborator

Overall looks pretty good, we should wait on #580 before merging this. I'm also going to tag @samuelgrubinger to review this as the key R user that prompted the need for this documentation.

This notebook is the R version of the Python workflow that uses `maap.aws.workspace_bucket_credentials()` to retrieve temporary AWS credentials for MAAP workspace and organization S3 buckets. It updates the access level description and adds information about two R access patterns for using temporary credentials.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants