You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "kevinjqliu (via GitHub)" <gi...@apache.org> on 2023/04/24 22:39:42 UTC

[GitHub] [arrow] kevinjqliu opened a new pull request, #35312: Clarify S3FileSystem Credentials chain for EC2

kevinjqliu opened a new pull request, #35312:
URL: https://github.com/apache/arrow/pull/35312

   <!--
   Thanks for opening a pull request!
   If this is your first pull request you can find detailed information on how 
   to contribute here:
     * [New Contributor's Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
     * [Contributing Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
   
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
   
   Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename the pull request title in the following format?
   
       GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   In the case of PARQUET issues on JIRA the title also supports:
   
       PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   -->
   
   ### Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   ### What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   When resolving AWS credentials on EC2 hosts, the underlying AWS SDK also looks at the EC2 Instance Metadata Service. 
   
   I want to document this behavior for `pyarrow`.  The [`s3fs` documentation](https://s3fs.readthedocs.io/en/latest/#credentials) mentions the specific case for EC2.
   
   #### Technical Details
   `S3FileSystem` uses the [`CS3Options.Defaults()`](https://github.com/apache/arrow/blob/5de56928e0fe43f02005552eee058de57ffb2682/python/pyarrow/_s3fs.pyx#L317) option when no credentials are passed into the constructor.  It utilizes the [`Aws::Auth::DefaultAWSCredentialsProviderChain`](https://github.com/apache/arrow/blob/1de159d0f6763766c19b183dd309b8757723b43a/cpp/src/arrow/filesystem/s3fs.cc#L213)
   
   The C++ implementation of [`DefaultAWSCredentialsProviderChain`](https://sdk.amazonaws.com/cpp/api/0.14.3/class_aws_1_1_auth_1_1_default_a_w_s_credentials_provider_chain.html) not only [reads the environment variable](https://sdk.amazonaws.com/cpp/api/0.14.3/class_aws_1_1_auth_1_1_environment_a_w_s_credentials_provider.html) when trying to resolve AWS credentials, but also [looks at profile config](https://sdk.amazonaws.com/cpp/api/0.14.3/class_aws_1_1_auth_1_1_profile_config_file_a_w_s_credentials_provider.html) and the [EC2 Instance Metadata Service](https://sdk.amazonaws.com/cpp/api/0.14.3/class_aws_1_1_auth_1_1_instance_profile_credentials_provider.html). 
   
   
   ### Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   No, just documentation changes
   
   ### Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please uncomment the line below and explain which changes are breaking.
   -->
   <!-- **This PR includes breaking changes to public APIs.** -->
   Yes, changing public documentation
   
   <!--
   Please uncomment the line below (and provide explanation) if the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld). We use this to highlight fixes to issues that may affect users without their knowledge. For this reason, fixing bugs that cause errors don't count, since those are usually obvious.
   -->
   <!-- **This PR contains a "Critical Fix".** -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] jorisvandenbossche commented on pull request #35312: GH-35409: [Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1534163433

   @kevinjqliu thanks for the contribution!
   
   We have a section about S3FileSystem in the user guide as well: https://arrow.apache.org/docs/dev/python/filesystems.html#s3. Could you have a look to see if that might require an equivalent update?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on a diff in pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #35312:
URL: https://github.com/apache/arrow/pull/35312#discussion_r1278643860


##########
python/pyarrow/_s3fs.pyx:
##########
@@ -140,14 +140,20 @@ cdef class S3FileSystem(FileSystem):
     """
     S3-backed FileSystem implementation
 
-    If neither access_key nor secret_key are provided, and role_arn is also not
-    provided, then attempts to initialize from AWS environment variables,
-    otherwise both access_key and secret_key must be provided.
+    AWS access_key and secret_key can be provided explicitly.
 
     If role_arn is provided instead of access_key and secret_key, temporary
     credentials will be fetched by issuing a request to STS to assume the
     specified role.
 
+    If neither access_key nor secret_key are provided, and role_arn is also not
+    provided, then attempts establish the credentials automatically.

Review Comment:
   Is `to` missing?
   
   ```suggestion
       provided, then attempts to establish the credentials automatically.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657745700

   Could you rebase on main to use #36943 ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657304115

   :warning: GitHub issue #35409 **has been automatically assigned in GitHub** to PR creator.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657565283

   We need pyarrow to build documents in `python/pyarrow/_s3fs.pyx`. So we can't use the approach.
   
   We need to use the full (at least including pyarrow) build approach.
   https://arrow.apache.org/docs/developers/documentation.html#building-with-docker is easier than https://arrow.apache.org/docs/developers/documentation.html#building .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou merged pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou merged PR #35312:
URL: https://github.com/apache/arrow/pull/35312


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1659445206

   Revision: f4b66d7de9bd9d4c67775572e3d7e03af4fb6046
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-84183cdf1d](https://github.com/ursacomputing/crossbow/branches/all?query=actions-84183cdf1d)
   
   |Task|Status|
   |----|------|
   |preview-docs|[![Github Actions](https://github.com/ursacomputing/crossbow/workflows/Crossbow/badge.svg?branch=actions-84183cdf1d-github-preview-docs)](https://github.com/ursacomputing/crossbow/actions/runs/5721620841/job/15503493517)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657304829

   @github-actions crossbow submit docs-preview


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657341222

   Revision: 4cdd0d25d781babdfd4dc70fafc82100dbbc1cb3
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-889dfc34d1](https://github.com/ursacomputing/crossbow/branches/all?query=actions-889dfc34d1)
   
   |Task|Status|
   |----|------|
   |preview-docs|[![Github Actions](https://github.com/ursacomputing/crossbow/workflows/Crossbow/badge.svg?branch=actions-889dfc34d1-github-preview-docs)](https://github.com/ursacomputing/crossbow/actions/runs/5709380156/job/15468121041)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] pitrou commented on pull request #35312: GH-35409: [Doc] Clarify S3FileSystem Credentials chain for EC2

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1549775031

   @jorisvandenbossche Would you like to take another look?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657305398

   ```
   Unable to match any tasks for `docs-preview`
   The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/5709116257
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657339914

   @github-actions crossbow submit preview-docs


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #35312: GH-35409: [Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1534158929

   :warning: GitHub issue #35409 **has been automatically assigned in GitHub** to PR creator.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657375335

   Thanks but we have 2 changed pages but the screenshot shows only 1 page.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kevinjqliu commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1659283488

   @kou I've rebased the branch and was able to build it locally using docker. Updated the description above to render changes to both files. 
   
   Thanks for guiding me through the process


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1659579973

   http://crossbow.voltrondata.com/pr_docs/35312/
   
   * http://crossbow.voltrondata.com/pr_docs/35312/python/filesystems.html#s3
   * http://crossbow.voltrondata.com/pr_docs/35312/python/generated/pyarrow.fs.S3FileSystem.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kevinjqliu commented on pull request #35312: GH-35409: [Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1534886103

   @jorisvandenbossche thanks for the review. I've updated the formatting issues and made changes to the S3 section of [`filesystems.html` docs](https://arrow.apache.org/docs/dev/python/filesystems.html#s3) as well.
   
   PTAL


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657309758

   @github-actions crossbow submit preview-docs


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kevinjqliu commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657388194

   The visible change is from `docs/source/python/filesystems.rst`. 
   `python/pyarrow/_s3fs.pyx` is a code comment change. 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] jorisvandenbossche commented on a diff in pull request #35312: GH-35409: [Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche commented on code in PR #35312:
URL: https://github.com/apache/arrow/pull/35312#discussion_r1184598615


##########
python/pyarrow/_s3fs.pyx:
##########
@@ -140,13 +140,17 @@ cdef class S3FileSystem(FileSystem):
     """
     S3-backed FileSystem implementation
 
-    If neither access_key nor secret_key are provided, and role_arn is also not
-    provided, then attempts to initialize from AWS environment variables,
-    otherwise both access_key and secret_key must be provided.
-
+    AWS access_key and secret_key can be provided explicitly.
+    
     If role_arn is provided instead of access_key and secret_key, temporary
     credentials will be fetched by issuing a request to STS to assume the
     specified role.
+    
+    If neither access_key nor secret_key are provided, and role_arn is also not
+    provided, then attempts to initialize from the Default AWS Credentials Provider Chain in order of:

Review Comment:
   Formatting nit: can you limit the line length here? 



##########
python/pyarrow/_s3fs.pyx:
##########
@@ -140,13 +140,17 @@ cdef class S3FileSystem(FileSystem):
     """
     S3-backed FileSystem implementation
 
-    If neither access_key nor secret_key are provided, and role_arn is also not
-    provided, then attempts to initialize from AWS environment variables,
-    otherwise both access_key and secret_key must be provided.
-
+    AWS access_key and secret_key can be provided explicitly.
+    
     If role_arn is provided instead of access_key and secret_key, temporary
     credentials will be fetched by issuing a request to STS to assume the
     specified role.
+    
+    If neither access_key nor secret_key are provided, and role_arn is also not
+    provided, then attempts to initialize from the Default AWS Credentials Provider Chain in order of:
+    * `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN` environment variables

Review Comment:
   ```suggestion
   
       * `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN` environment variables
   ```
   
   RestructuredText markup needs a blank line before a bullet point list



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] conbench-apache-arrow[bot] commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1672492110

   After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit 334b46d349af897ba03d7d72be86d23aa5ee8b43.
   
   There were no benchmark performance regressions. 🎉
   
   The [full Conbench report](https://github.com/apache/arrow/runs/15769857971) has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1659443600

   @github-actions crossbow submit preview-docs


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kevinjqliu commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657541603

   > We use it for API reference: https://arrow.apache.org/docs/python/generated/pyarrow.fs.S3FileSystem.html#pyarrow.fs.S3FileSystem
   
   I see. I'm following [Building a single directory for dev purposes without all the pre-requisites](https://arrow.apache.org/docs/developers/documentation.html#building-a-single-directory-for-dev-purposes-without-all-the-pre-requisites) to render the changes for `docs/source/python`.
   
   The changes in `python/pyarrow/_s3fs.pyx` does not show up. How can I render that part? 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657402439

   We use it for API reference: https://arrow.apache.org/docs/python/generated/pyarrow.fs.S3FileSystem.html#pyarrow.fs.S3FileSystem


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657310820

   Revision: a2748ffe436c0b86411a75e62a408824596cdb93
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-4f25ed291d](https://github.com/ursacomputing/crossbow/branches/all?query=actions-4f25ed291d)
   
   |Task|Status|
   |----|------|
   |preview-docs|[![Github Actions](https://github.com/ursacomputing/crossbow/workflows/Crossbow/badge.svg?branch=actions-4f25ed291d-github-preview-docs)](https://github.com/ursacomputing/crossbow/actions/runs/5709194921/job/15467692181)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #35312: Clarify S3FileSystem Credentials chain for EC2

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1520914931

   <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
   -->
   
   Thanks for opening a pull request!
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
   
   Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename the pull request title in the following format?
   
       GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   In the case of PARQUET issues on JIRA the title also supports:
   
       PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   See also:
   
     * [Other pull requests](https://github.com/apache/arrow/pulls/)
     * [Contribution Guidelines - How to contribute patches](https://arrow.apache.org/docs/developers/contributing.html#how-to-contribute-patches)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #35312: GH-35409: [Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1534158902

   * Closes: #35409


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kevinjqliu commented on pull request #35312: GH-35409: [Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1543298103

   @jorisvandenbossche fixed a formatting issue. there was something wrong with CI too, hence the force pushes. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kevinjqliu commented on pull request #35312: GH-35409: [Doc] Clarify S3FileSystem Credentials chain for EC2

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1560355394

   hey, @jorisvandenbossche wanted to ping on this again. thanks!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on a diff in pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #35312:
URL: https://github.com/apache/arrow/pull/35312#discussion_r1278643546


##########
python/pyarrow/_s3fs.pyx:
##########
@@ -140,14 +140,20 @@ cdef class S3FileSystem(FileSystem):
     """
     S3-backed FileSystem implementation
 
-    If neither access_key nor secret_key are provided, and role_arn is also not
-    provided, then attempts to initialize from AWS environment variables,
-    otherwise both access_key and secret_key must be provided.
+    AWS access_key and secret_key can be provided explicitly.
 
     If role_arn is provided instead of access_key and secret_key, temporary
     credentials will be fetched by issuing a request to STS to assume the
     specified role.
 
+    If neither access_key nor secret_key are provided, and role_arn is also not
+    provided, then attempts establish the credentials automatically.
+    S3FileSystem will try the following methods, in order:
+
+    * `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN` environment variables
+    * configuration files such as `~/.aws/credentials` and `~/.aws/config`

Review Comment:
   We need two `` ` ``s for reStructuredText:
   
   ```suggestion
       * ``AWS_ACCESS_KEY_ID``, ``AWS_SECRET_ACCESS_KEY``, and ``AWS_SESSION_TOKEN`` environment variables
       * configuration files such as ``~/.aws/credentials`` and ``~/.aws/config``
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kevinjqliu commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657332481

   thanks @kou I've applied your suggestions


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kevinjqliu commented on pull request #35312: GH-35409: [Python][Docs] Clarify S3FileSystem Credentials chain for EC2

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #35312:
URL: https://github.com/apache/arrow/pull/35312#issuecomment-1657357724

   @kou built the changes locally, I've attached a screenshot above 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org