event.requestContext.identity.cognitoIdentityId
should be the user id- Cognito User Pools are for handling user registration, authentication, and account recovery
- Cognito Identity Pools (or Cognito Federated Identities) are a way to authorize users to directly use the various AWS services in your account, such as S3, DynamoDB, and, most relevant for APIs, API Gateway
resources: