Repository navigation
Labels
Description
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
- This feature request meets Powertools for AWS Lambda (Python) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsComing soon
Activity
github-actions commentedon Jul 17, 2025
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.
github-actions commentedon Jul 29, 2025
This is now released under 3.18.0 version!