Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 2 tasks
dreamorosi opened this issue May 12, 2025 · 0 comments
Open
1 of 2 tasks

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

dreamorosi opened this issue May 12, 2025 · 0 comments
Assignees
Labels
feature-request feature request parser Parser (Pydantic) utility

Comments

@dreamorosi
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request feature request parser Parser (Pydantic) utility
Projects
Status: Working on it
Development

No branches or pull requests

2 participants