Rihla Fragrances — static site with a serverless AWS backend

The website for Rihla Fragrances, my small Adelaide business offering Arabic and Middle Eastern perfumes. Static pages on a Cloudflare Worker, with one AWS Lambda behind the enquiry form.

Updated December 2026 · Visit the live site

What it does

The site presents the business and takes enquiries. The pages are plain HTML, CSS and JavaScript with no build step. The only server-side work is handling the enquiry form: checking that a submission is genuine, saving it, telling the business and, optionally, confirming receipt to the customer.

The domain is registered with VentraIP and its DNS is managed at Cloudflare. The backend runs in AWS in Sydney (ap-southeast-2). Old Shopify URLs are redirected to the homepage.

What happens to an enquiry

  1. Browser

    Submit the form

    The page posts JSON to a Lambda Function URL.

  2. Lambda

    Reject bad requests

    A payload size limit, field validation and a hidden honeypot field run first, followed by Cloudflare Turnstile verification.

  3. SES

    Assess the address

    If confirmations are on, SES Email Validation rates how deliverable the address looks. The rating never blocks the enquiry.

  4. DynamoDB

    Save the enquiry

    The enquiry is stored, along with the result of the address check.

  5. SNS

    Notify the business

    The enquiry is emailed to the business inbox.

  6. SES

    Confirm to the customer

    A confirmation is sent only if confirmations are on and the address rated high or medium.

The enquiry is saved before any email is attempted.

Decisions worth explaining

Moving off Shopify

The business site was previously on Shopify, which was too expensive and more than the business needed. A static site with a small backend covers what it does need, and at current volume the AWS side costs cents per month.

Save first, email second

An enquiry should never be lost to an email problem. If the notification or confirmation fails after the save, the failure is logged and the customer still sees success.

A fixed confirmation template

The only thing the customer typed that the confirmation repeats is a sanitised first name, never the message. This stops the form being used to send a stranger's text or links from the business's domain.

Cheap checks before paid ones

SES Email Validation is charged per address, so it runs only after Turnstile has passed and only when confirmations are enabled.

A subdomain for automated mail

Confirmations are sent from a subdomain with DKIM and a custom MAIL FROM, which keeps any reputation problem away from the domain used for business email. Bounces and complaints are reported and added to a suppression list.

A public endpoint, protected in the function

The Function URL is visible in the page source, so hiding it is not a control. Protection comes from Turnstile, validation, size limits and the honeypot.

Test and production

main is production. Changes go to a short-lived staging branch, which Cloudflare builds as a preview, and reach main through a pull request.

The page chooses its settings by hostname. The live domain uses the production function and a real Turnstile key; previews and local copies use a separate test function and Cloudflare's test key. Nothing has to be swapped at merge time.

The Lambda is deployed separately. The copy in the repository is the source of truth, and it is pasted into the console by hand: test first, then production.

Monitoring and cost

CloudWatch alarms cover function errors, server errors returned to visitors, unusual invocation volume and throttling. Notification failures are caught by the function, so they do not count as Lambda errors. A log metric filter and its own alarm cover that gap.

At current volume the AWS side costs cents per month, and budget alerts are set on the account.

Known limitations and next steps

The backend is not yet infrastructure as code. Rebuilding it in Terraform, with a least-privilege execution role, is on the backlog.

Lambda deployment is manual, so the console and the repository can drift if the code is edited in the wrong place.

Still planned: backups for the enquiries table, a catalogue and stock API, and a private page for managing enquiries.

Stack

Site
HTML, CSS, JavaScript
Edge
Cloudflare Workers static assets, Cloudflare DNS, Turnstile
Backend
Python 3.14, AWS Lambda Function URL, DynamoDB, SNS, SES
Operations
CloudWatch, AWS budget alerts, GitHub