Inspiration

Facial recognition is rapidly becoming a normalized part of everyday life, from airport surveillance and retail analytics to social media auto-tagging. But most people are unaware of how much personal information they leak every time they upload a photo: location data, camera models, timestamps, and even their own face. Tools like Fawkes inspired us to explore adversarial image cloaking as a defense, but most of them require GPU access or complex local setup. I wanted something lightweight, serverless, and instantly usable. That’s where CamoBucket comes in.

What it does

CamoBucket automatically cloaks photos as soon as they’re uploaded to a specific S3 bucket. It adds imperceptible adversarial noise to confuse facial recognition algorithms, while preserving image quality for humans. At the same time, it removes any embedded metadata such as GPS coordinates or camera info. All of this happens instantly, via an AWS Lambda function triggered by new uploads to the input/ folder. The processed images are saved in the output/ folder, ready to share, now safer and scrubbed.

You can deploy one for yourself with no coding by just clicking below!

Launch Stack

How I built it

CamoBucket is powered by:

  • Amazon S3, which stores original and processed photos
  • AWS Lambda, which runs the privacy transformation logic on every new upload
  • CloudFormation, which deploys the full infrastructure in one click
  • Pillow and NumPy, used in the Lambda function to apply Gaussian noise and rewrite the image

CamoBucket architecture diagram

The Lambda function was written in Python and packaged with its dependencies using a Lambda Layer built in Docker. I also used a CloudFormation custom resource to automatically create the necessary S3 folder structure and wire up S3 trigger notifications.

Challenges I ran into

My original plan was to use the Fawkes library itself, but I quickly ran into AWS Lambda’s 250MB unzipped deployment limit. Most adversarial cloaking libraries depend on large frameworks like PyTorch and OpenCV, which are too heavy for Lambda. To overcome this, I implemented a lighter-weight noise generation strategy that targets face-likely regions of the image and still achieves the core goal: making the image harder for machines to interpret while remaining clear to humans.

I also had to account for CloudFormation’s strict handling of custom resources and asynchronous Lambda behavior when initializing the stack.

Accomplishments that I'm proud of

  • Built a fully functional, deployable privacy pipeline using only AWS serverless components
  • Overcame size constraints to design a clever workaround for facial cloaking
  • Created an infrastructure-as-code solution that’s one-click deployable
  • Developed something genuinely useful that can be self-hosted, forked, or expanded

What I learned

I learned a lot about the constraints of serverless environments and how to work within them creatively. I also gained experience managing CloudFormation custom resources, Docker-based Lambda Layer creation, and edge-case handling in image processing pipelines. Most of all, I learned that even without GPUs or massive libraries, you can still deliver meaningful privacy protections using clever techniques and native cloud tools.

What's next for CamoBucket - Automatically cloak uploaded images with Lambda

I’d like to improve the cloaking algorithm by incorporating lightweight face detection or adversarial patch generation. I'm also exploring ways to optionally forward cloaked images to trusted destinations, such as encrypted cloud storage. Lastly, I’d love to integrate a simple mobile-friendly front end to make it easier to make your photos safe on the go.

Built With

Share this project:

Updates