Description
Use case
The Parser utility has a number of built-in schemas and envelopes that customers can use in their functions. Currently, all of these except two are exposed via a barrel file @aws-lambda-powertools/parser/schemas
.
We should work towards exporting each category of schemas and envelopes on a per-service basis via dedicated exports.
Solution/User Experience
Customers should be able to import any given schema or envelope using a targeted export, for example, all the API Gateway-related schemas should be available under the @aws-lambda-powertools/parser/schemas/api-gateway
export and all the S3 ones under @aws-lambda-powertools/parser/schemas/s3
, the same applies to envelopes which would have, for example, SQS envelopes under @aws-lambda-powertools/parser/envelopes/sqs
.
With this change, customers would be able to have a slimmer bundle since they'd be importing only the schemas/envelopes of the category they're actually using instead of all of them.
Alternative solutions
No response
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