S3 Bucket Setup

Create and configure an S3 bucket to store deduplicated files with versioning, encryption, and secure access for Lambda.

Amazon S3 (Simple Storage Service) is used to store deduplicated files in this project. Each uploaded file is stored only once in S3, regardless of how many users upload it, thanks to SHA-256–based file hashing and metadata management.

In this chapter, you’ll create the necessary S3 bucket and configure it for versioning, encryption, and Lambda access.

Step 1: Create a New S3 Bucket

  1. Go to the AWS Console → S3

  2. Click Create bucket

  3. Set:

    • Bucket name: owncloud-dedup-files (or any unique name)

    • Region: Same as your Lambda functions

  4. Uncheck “Block all public access” only if your application requires public file access (⚠️ generally keep this enabled for security)


  • Scroll to the Bucket Versioning section

  • Choose Enable

  • This allows S3 to keep multiple versions of the same object (useful for future file versioning support)


Step 3: Enable Default Encryption

  1. Scroll to Default Encryption

  2. Choose Enable encryption

  3. Select:

    • SSE-S3 (Amazon S3 key) – for simple encryption

    • Or SSE-KMS – for advanced, key-managed encryption (recommended for production)

    S3 Buckets created will be displayed on the dashboard.

Step 4: Test Upload (Optional)

You can test uploading a file using the AWS CLI:

aws s3 cp test.txt s3://owncloud-dedup-files/

You should see the file appear in your bucket.


You’re Done✅

Your S3 bucket is now ready to store deduplicated files. The Lambda functions will interact with this bucket to:

  • Upload new unique files

  • Reuse existing files

  • Delete files when no users are linked

Last updated