Lambda pricing is duration-based so for larger files your function will take longer to complete, costing you more.You need to write code inside your Lambda to manage the multipart file upload and the edge cases around this, whereas the existing S3 SDKs are already optimized for this.While this approach is valid and achievable, it does have a few limitations:
#Serverless offline local dynamodb how to#
in Express.js), my initial approach was to investigate how to use a Lambda-backed API Gateway endpoint that would handle everything: authentication, authorization, file upload and finally writing the S3 location and metadata to the database. Having built similar functionality in the past using non-serverless technologies (e.g. (No using the AWS Console for mutable operations here 🚫🤠)
You also need to add a reference to these uploaded files against entities in your database, along with metadata supplied by the client. So you’re building a REST API and you need to add support for uploading files from a web or mobile app.