Skip to content

Feature request: add models for AppSync Events in Parser #6648

Description

@dreamorosi

Use case

Similar to what being done in the TypeScript repo, we should add Pydantic models for the new AppSync Events subscribe and publish events.

Solution/User Experience

See the models at aws-powertools/powertools-lambda-typescript#3907

As additional context, these are the payloads for the different configurations of identity:

  • API_KEY

identity: null

  • AWS_IAM
"identity": {
  "accountId": "123456789012",
  "cognitoIdentityAuthProvider": null,
  "cognitoIdentityAuthType": null,
  "cognitoIdentityId": null,
  "cognitoIdentityPoolId": null,
  "sourceIp": [
    "192.154.253.25"
  ],
  "userArn": "arn:aws:sts::123456789012:assumed-role/Admin/foo",
  "username": "ABCDEFGHILMNOPQR1STUV:fo"
},
  • AMAZON_COGNITO_USER_POOLS
"identity": {
  "claims": {
    "origin_jti": "dc910c8f-552d-4cfe-8972-4cc1611cd01e",
    "sub": "146804a8-1011-70c7-3f89-f60ee6593bf7",
    "event_id": "171ad175-5438-4687-8a3b-3afb81ca2323",
    "token_use": "access",
    "scope": "aws.cognito.signin.user.admin",
    "auth_time": 1746794626,
    "iss": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_1aaBCDefg",
    "exp": 1746798226,
    "iat": 1746794626,
    "client_id": "a1bcd2efghi34l56mn7opwrst",
    "jti": "7b0fecf5-2ee3-4321-951c-6caac640d908",
    "username": "foo"
  },
  "groups": null,
  "issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_1aaBCDefg",
  "sourceIp": [
    "192.154.253.25"
  ],
  "sub": "146804a8-1011-70c7-3f89-f60ee6593bf7",
  "username": "foo"
}
  • AWS_LAMBDA
"identity": {
  "handlerContext": {}
}
  • OPENID_CONNECT
"identity": {
  "claims": {
    "origin_jti": "dc910c8f-552d-4cfe-8972-4cc1611cd01e",
    "sub": "146804a8-1011-70c7-3f89-f60ee6593bf7",
    "event_id": "171ad175-5438-4687-8a3b-3afb81ca2323",
    "token_use": "access",
    "scope": "aws.cognito.signin.user.admin",
    "auth_time": 1746794626,
    "iss": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_1aaBCDefg",
    "exp": 1746798226,
    "iat": 1746794626,
    "client_id": "a1bcd2efghi34l56mn7opwrst",
    "jti": "7b0fecf5-2ee3-4321-951c-6caac640d908",
    "username": "foo"
  },
  "groups": null,
  "issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_1aaBCDefg",
  "sourceIp": [
    "192.154.253.25"
  ],
  "sub": "146804a8-1011-70c7-3f89-f60ee6593bf7",
  "username": "foo"
}

Alternative solutions

Acknowledgment

Activity

  1. added
    feature-request
    parser
    on May 12, 2025
  2. moved this from Backlog to Working on it in Powertools for AWS Lambda (Python)on May 12, 2025
  3. moved this from Working on it to Backlog in Powertools for AWS Lambda (Python)on Jun 16, 2025
  4. removed their assignment
    on Jul 7, 2025
  5. moved this from Backlog to Working on it in Powertools for AWS Lambda (Python)on Jul 17, 2025
  6. github-actions commented on Jul 17, 2025

    @github-actions
    Contributor

    ⚠️COMMENT VISIBILITY 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 tag a team member or open a new issue that references this one.

    If you wish to keep having a conversation with other community members under this issue feel free to do so.

  7. added
    pending-release
    on Jul 17, 2025
  8. github-actions commented on Jul 29, 2025

    @github-actions
    Contributor

    This is now released under 3.18.0 version!

  9. removed
    pending-release
    on Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestparser

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions