A lightweight parser for multipart/form-data requests in AWS Lambda environments. Version 0.2.1 provides typed output and supports binary file data, addressing limitations of the parent library myshenin/aws-lambda-multipart-parser. Released as needed, it is a dependency-free utility requiring API Gateway binary support configuration. Differentiates with TypeScript types and explicit handling of binary fields, unlike alternatives that may lack type safety or ignore binary content.
npm install aws-multipart-parserVerified import paths — ran on the pinned version, not inferred.
Shows how to import and use the parse function in an AWS Lambda handler, including error handling and TypeScript integration.
Add 'multipart/form-data' to API Gateway binary media types, or use serverless-apigw-binary plugin.
Always pass true as second argument to force parsing, or ensure proper boundary in headers.
Migrate to aws-multipart-parser for TypeScript support and bug fixes.
Use Buffer.from(fileValue, 'base64') to get binary data for further processing.
Ensure API Gateway is configured to pass headers, or invoke lambda with proper multipart request.
Enable binary media types on API Gateway, specifically 'multipart/form-data'.
Update to aws-multipart-parser@0.2.1 and import type { ParsedFormData }.No dependency data recorded yet.