Menu

1 / 2

Day 75: Building a "Nuclear" Delete Button and S3 Avatar Uploads

DEV Community·Eric Rodríguez·6 months ago
#k2u3WS6i
#aws#serverless#react#python#user
Reading 0:00
15s threshold

Today I tackled user profile management in my serverless financial app. I added AWS S3 for profile pictures and a Nuclear Button for absolute data deletion.

(The Avatar Upload)

Sending binary files through API Gateway can be tricky. Instead of dealing with multipart/form-data natively in the API Gateway, I converted the images to base64 in React. My Python Lambda takes this string, decodes it, and uses boto3 (s3_client.put_object) to store the image in an S3 bucket with an ACL of 'public-read'.

(The Nuclear Button)

Soft deletes are easy, but real privacy requires hard deletes.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.