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:
Resources:
CognitoUserPoolMyUserPool: # Where "MyUserPool" is the name of the pool as used elsewhere in serverless.yml
Type: AWS::Cognito::UserPool
Properties:
# Place the rest of the cft here https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html