HOW APPENDING TO GO SLICES CAN UNEXPECTEDLY CHANGE OTHER SLICES
Arrays in Go are different from arrays in other languages—they have a fixed size that cannot be changed. For dynamic arrays, Go uses slices instead. You can find basic information about arrays and slices here. While appending new elements to a slice is allowed and will increase the size when needed, this operation can sometimes unexpectedly modify elements in other slices.
AWS LAMBDA BASE64 ENCODED REQUEST BODY/RESPONSE BODY
When working with AWS Lambda, you may encounter scenarios where the request body appears as a base64 encoded string with an isBase64Encoded
flag. While most guides focus on decoding the request body within your Lambda function, this post examines why this encoding happens in the first place.
LAMBDA HIT 6MB LIMIT EVEN IF FILE SMALLER THAN 6MB
As discussed in AWS Lambda File Basic Concept, AWS Lambda has a 6MB payload size limit. However, you might encounter failures when sending files smaller than 6MB (like a 5MB file). This happens because encoding a buffer to a base64 string in the Lambda callback significantly increases the payload size.
AWS LAMBDA FILE BASIC CONCEPT
In recent years, more applications have chosen to implement serverless architecture. Serverless computing allows you to execute code without managing servers and provides an easy way to handle concurrent execution. This approach is particularly suitable for short-lived, event-driven functions. Running RESTful API servers in serverless environments has become increasingly common. In addition to returning JSON responses, serverless functions can also return binary files.