Skip to content

Bug: TransferFamilyAuthorizerResponse sets the PosixProfile Uid to the gid #8522

Closed

Description

@LuisFigueroaG

Expected Behaviour

TransferFamilyAuthorizerResponse.build_authentication_response_efs(..., user_gid=1000, user_uid=1001) should return a PosixProfile of {"Gid": 1000, "Uid": 1001}, as described in the Transfer Family custom identity provider docs.

Current Behaviour

It returns {"Gid": 1000, "Uid": 1000}: the Uid is set to the gid. In aws_lambda_powertools/utilities/data_classes/transfer_family_event.py:

if user_uid is not None:
    response["PosixProfile"] = {"Gid": user_gid, "Uid": user_gid}

So EFS-backed users authenticate with the wrong POSIX user id whenever their uid and gid differ.

Code snippet

from aws_lambda_powertools.utilities.data_classes.transfer_family_event import TransferFamilyAuthorizerResponse

response = TransferFamilyAuthorizerResponse().build_authentication_response_efs(
    role_arn="arn:aws:iam::123456789012:role/transfer",
    user_gid=1000,
    user_uid=1001,
)
print(response["PosixProfile"])  # {'Gid': 1000, 'Uid': 1000}

Possible Solution

Use user_uid for the Uid key. Happy to send a PR with a test.

Steps to Reproduce

Run the snippet above.

Powertools for AWS Lambda (Python) version

latest

AWS Lambda function runtime

3.12

Packaging format used

PyPi

Activity

  1. boring-cyborg commented on Oct 6, 2026

    @boring-cyborg

    Thanks for opening your first issue here! We'll come back to you as soon as we can.
    In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

  2. powertools-for-aws-oss-automation commented on Oct 6, 2026

    @powertools-for-aws-oss-automation

    Thanks for opening your first issue here! We'll come back to you as soon as we can.
    In the meantime, check out our GitHub Discussions: Join the conversation

  3. powertools-for-aws-oss-automation commented on Oct 16, 2026

    @powertools-for-aws-oss-automation

    Warning

    This issue is now closed. Please be mindful that future comments are hard for our team to see.
    If you need more assistance, please either reopen the issue, or open a new issue referencing this one.
    If you wish to keep having a conversation with other community members under this issue feel free to do so.

  4. github-actions commented on Oct 22, 2026

    @github-actions
    Contributor

    This is now released under 3.37.0 version!

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions