Closed
Description
Use case
To continue implementation of parser
, add schemas for Cognito Lambda triggers. Lambda triggers customize the flow of user pool sign-up, authentication, etc. Details are in docs.
Solution/User Experience
Cognito schemas would be similar to existing schemas in the parser
middleware. Many of the schemas would be similar / same.
For example, a basic event schema for the pre-signup trigger:
z.object({
version: z.string(),
region: z.string(),
userPoolId: z.string(),
userName: z.string(),
callerContext: z.object({
awsSdkVersion: z.string(),
clientId: z.string()
}),
triggerSource: z.string(),
request: z.object({
userAttributes: z.record(z.string(), z.string()),
validationData: z.record(z.string(), z.string()).nullable().optional(),
userNotFound: z.boolean().optional()
}),
response: z.object({
autoConfirmUser: z.boolean().optional(),
autoVerifyEmail: z.boolean().optional(),
autoVerifyPhone: z.boolean().optional()
}).optional()
});
Alternative solutions
Acknowledgment
- This feature request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Shipped