'decoding a base64 in lambda and uploading it to s3

Objective: decode base64 image and upload it to s3 from lambda function.

So in my current db structure, a base64 image is sent to aws lambda via API gateway and then stored in dynamodb. Instead of this, I would like to somehow decrypt the base64 image and store it in s3. All entirely from a lambda function.

If possible could the kind replier please provide some basic lambda code that I can experiment with?

Client -> {send a base 64 image} -> lambda -> {decode base64} -> {store image in s3}```


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source