Skip to content

Missing AWS Profile Support in PyIceberg #2841

Closed

Description

@thomas-pfeiffer

Feature Request / Improvement

Feature: Missing AWS Profile Support in PyIceberg / PyIceberg should support AWS profiles

Description:
When working with multiple AWS configs / credentials in parallel, AWS profiles are a convenient way to achieve this. Ideally, PyIceberg should therefore also support AWS profiles, which it currently does not.

Current state (as of writing - pyIceberg v0.10.0):

  • The Glue part of the GlueCatalog can be configured to use the profile by specifying the Glue client explicitly in the Glue Catalog or via glue.profile-name config parameter:
from boto3 import Session
...
catalog = GlueCatalog(name="your_glue_catalog",client=Session(profile_name="your_aws_profile").client("glue"),...)

or

catalog = GlueCatalog(
    name="your_glue_catalog",
    **{ 
        "glue.profile-name": "your_aws_profile",
        ...
    },
)
from s3fs import S3FileSystem
from aiobotocore.session import AioSession
...
fs = S3FileSystem(session=AioSession(profile="your_aws_profile"),...)

Workaround for this feature gap:

session = Session(profile_name="your_aws_profile")
credentials = session.get_credentials()  
if credentials is None:
    raise ValueError("Could not retrieve credentials for profile")
catalog = GlueCatalog(
    name="your_glue_catalog",
    **{ 
        "client.access-key-id": credentials.access_key,
        "client.secret-access-key": credentials.secret_key,
        "client.session-token": credentials.token,
        ...
    },
)

To-Be / Expected Behavior:

  1. PyIceberg should have a new client.profile-name and s3.profile-name configuration parameter (next to existing glue.profile-name.
  2. New client.profile-name should also set glue.profile-name (same behaviour as for all the other unified AWS credentials).
  3. For now, AWS profile support should be implemented for fsspec backend and client.profile-name and s3.profile-name should only be supported when using fsspec backend ("py-io-impl": "pyiceberg.io.fsspec.FsspecFileIO").
  4. Once PyArrow supports AWS profile names (see [Python][C++] Add Profile support to S3FileSystem arrow#47880), AWS profile support should be implemented for PyArrow backend as well and client.profile-name and s3.profile-name should be fully supported.

Remark: I found this feature gap with the GlueCatalog; it might be that the RestCatalog is equally affected, but not sure.
Issues possibly related to this issue: #570, #1207, #2657

Activity

  1. statsops commented on Jan 25, 2026

    @statsops
    Contributor

    Is this issue working on? I want to work on this issue.

  2. added a commit that references this issue on Jan 27, 2026
    382a15b
  3. thomas-pfeiffer commented on Feb 13, 2026

    @thomas-pfeiffer
    ContributorAuthor

    First of all, thanks to @stats-dev for the fix and apologies for the late reply. Few follow-up questions:

    As per my understanding of #2948, the new s3.profile-name and client.profile-name are only supported in FsspecFileIO, but not in PyArrowFileIO. @stats-dev and @kevinjqliu - Is that your understanding as well?

    (My reasoning being that #2948 didn't change pyiceberg/io/pyarrow.py and the fact that apache/arrow#47880 is still open.)

    • If so, do we need to add a remark in the documentation, that s3.profile-name and client.profile-name are only supported when using FsspecFileIO at least for now?
    • @kevinjqliu Should I create a new, follow-up issue for the pyArrow part? Or what's the preferred way to track this? (The issue would be effectively blocked till pyArrow implements the AWS profile feature on their side.)

    For PyArrow backend, the AWS profile support is not yet available, but they do have an enhancement ticket for it (see apache/arrow#47880). Once AWS profile is supported in PyArrow it can be implemented in PyIceberg as well, I assume.

  4. statsops commented on Feb 13, 2026

    @statsops
    Contributor

    Thanks for the thoughtful follow-up.

    Yes — that matches my understanding as well. In #2948 we only added support for s3.profile-name and client.profile-name on the fsspec backend (FsspecFileIO), and PyArrowFileIO is unchanged. So AWS profile selection is not supported on the PyArrow backend yet, and it’s currently blocked on issue #47880.

    I agree we should add a short note to the docs clarifying that these options are currently supported only when using FsspecFileIO, maybe making another issue/PR?
    Creating a follow-up issue to track PyArrowFileIO support (blocked by apache/arrow #47880) also sounds like the right way to track this.

  5. thomas-pfeiffer commented on Feb 18, 2026

    @thomas-pfeiffer
    ContributorAuthor

    @stats-dev sounds good.

    FYI - I created #3065 as the follow up ticket to expand the feature to the PyArrrow backend and #3066 for the documentation fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions