Note that you mentioned that base64 is being truncated in Lambda, but in fact this would happen in the Gateway API. You can see an example of this in documentation .
Using an AWS Lambda function to upload is certainly not the best solution, especially at cost. Probably what you are trying to do is to pass base64
to the function and using SDK
of AWS S3
to upload.
S3 itself already has SDKs in the most different languages to upload (including Javascript, which should probably be your case in the frontend), as can be seen in this documentation . You may also be interested in the S3 Transfer Acceleration documentation.