Deploying Static Receipt Upload Infrastructure for QuickDumpNow Trailer Rental Business

What Was Done

This session focused on two parallel objectives: deploying a receipt management page for the QuickDumpNow trailer rental business at https://quickdumpnow.com/books, and automating port sheet generation for JADA sailing operations. This post covers the QuickDumpNow infrastructure work.

The core problem: the /books path was returning the homepage instead of a dedicated receipts page. This happened because CloudFront had a custom error response configuration that redirected all 404s to the root index, and the S3 object didn't exist at the expected key location.

Technical Details: S3 and CloudFront Architecture

The QuickDumpNow site uses a common pattern: CloudFront distribution in front of an S3 bucket origin, with a custom 404 error response pointing back to the homepage. This works well for single-page applications but breaks static content at specific paths.

The Problem:

  • Source file existed locally at /Users/cb/Documents/repos/sites/quickdumpnow.com/books/index.html
  • File needed deployment to S3 bucket (S3 bucket name not exposed, following security practices)
  • CloudFront distribution was configured with error response: 404 → redirect to /index.html
  • S3 object wasn't being created at the right key path

The Solution:

Deploy to two S3 keys to support both URL patterns:

  • s3://bucket/books/index.html — allows pretty URLs (/books resolves via directory index)
  • s3://bucket/books — direct object for fallback access

This dual-path approach ensures CloudFront serves content correctly regardless of whether the client requests /books or /books/. S3 directory index behavior requires the key to be books/index.html, but we also uploaded to a bare books key as a fallback.

Robots.txt Update:

The robots.txt file was modified to block the /books path from search engine crawling:

Disallow: /books

This prevents the receipts page from being indexed—appropriate for internal business documents that shouldn't appear in search results.

CloudFront Invalidation Strategy

After uploading the new S3 objects, we invalidated the CloudFront cache with two invalidation patterns:

  • /books — the bare path
  • /books/* — any nested paths under books
  • /robots.txt — updated robots file

CloudFront invalidations don't happen instantly; propagation takes 30–60 seconds as edge nodes in AWS's global network fetch the new content from origin. This is why checking https://quickdumpnow.com/books immediately after invalidation shows stale content.

Key Infrastructure Decisions

Why not use API Gateway + Lambda for file uploads?

The current architecture is static HTML served via S3 + CloudFront. Adding dynamic receipt uploads would require:

  • API Gateway endpoint for multipart file uploads
  • Lambda function to validate and store files
  • DynamoDB or RDS for metadata tracking
  • IAM roles and VPC configuration

For now, the page is a placeholder—designed to guide users but not yet functional for uploads. A future phase will implement the upload backend.

Why block /books in robots.txt?

Search engines shouldn't index internal business pages. This keeps the site's search presence clean and prevents users from finding old or outdated receipt data through Google.

Why deploy to both books/index.html and bare books?

S3 doesn't have true "directories"—it has flat key namespacing. CloudFront's directory index feature (configured to default to index.html`) only works if the request path has a trailing slash or if you upload to the exact key the client requests. By uploading to both keys, we ensure the page loads regardless of whether CloudFront receives /books or /books/`.

Deployment Commands (Sanitized)

# List site structure
ls -la /Users/cb/Documents/repos/sites/quickdumpnow.com/

# Upload books page and robots.txt to S3
aws s3 cp books/index.html s3://bucket/books/index.html
aws s3 cp books/index.html s3://bucket/books
aws s3 cp robots.txt s3://bucket/robots.txt

# Invalidate CloudFront cache
aws cloudfront create-invalidation \
  --distribution-id [DIST_ID] \
  --paths "/books" "/books/*" "/robots.txt"

# Verify invalidation status
aws cloudfront get-invalidation \
  --distribution-id [DIST_ID] \
  --id [INVALIDATION_ID]

What's Next

The placeholder receipt page is now live. The next phase should include:

  • Upload form frontend: HTML5 file input with client-side validation (PDF, PNG, JPG only; max 10MB)
  • Backend API: API Gateway + Lambda to receive multipart uploads, validate file type, and store in S3
  • Database layer: Track receipt metadata (date, amount, rental ID) in DynamoDB or PostgreSQL
  • Authentication: Cognito user pool or simple API key for trailer business staff
  • List/retrieve: Query and display uploaded receipts with filtering by date range

The static infrastructure is ready; the dynamic backend is the next step.