Gut Insight is an educational digestive health web app built on AWS.
It provides:
-
A home page and navigation for topic-focused learning
-
A FODMAP ingredient checker backed by a serverless API
-
Educational pages for celiac disease and Crohn's disease
-
Website URL: www.gut-insight.com
This project is for educational use only and is not medical advice.
It does not replace professional care from a qualified clinician.
Do not enter personal identifiers in ingredient lookup fields.
index.html- Home pagefodmap.html- FODMAP checker and FODMAP educationceliac.html- Celiac disease educationcrohns.html- Crohn's disease educationapp.js- Frontend lookup request logicstyles.css- Shared stylinglookup_api/handler.py- Lambda handler forGET /lookuptemplate.yaml- SAM template for API/Lambda infrastructure
- AWS credentials configured locally, for example in
~/.aws/credentials - IAM permissions for:
- Lambda invoke, such as
lambda:InvokeFunction - DynamoDB import/write, such as
dynamodb:BatchWriteItemanddynamodb:DescribeTable
- Lambda invoke, such as
python import_foods.py --table Foods --csv "FODMAP Diet - Foods Dataset - V2.csv" --region us-east-2python fodmap_checker.py --ingredient garlicThe checker output includes:
severityClassificationreason
Users access static pages through S3 and CloudFront.
The browser calls GET /lookup on API Gateway, which invokes Lambda and reads from DynamoDB.
The live API currently supports the FODMAP checker path.
Celiac and Crohn's pages are educational content pages.
Install the AWS SAM CLI, then run:
sam validate
sam build
sam deploy --guidedDuring --guided:
- Set
FoodsTableNameto your table, for exampleFoods - Set
CorsAllowOriginto your site origin once known, for examplehttps://www.gut-insight.com - Use
*only for temporary early testing
After deployment, copy the HttpApiUrl output, for example:
https://abc123.execute-api.us-east-2.amazonaws.com
Smoke test:
HTTP_API_URL="https://YOUR_API_ID.execute-api.REGION.amazonaws.com"
curl -sS "${HTTP_API_URL}/lookup?restriction=FODMAP&ingredient=garlic"Expected fields include:
severityClassificationreasonrestrictioningredient
In fodmap.html, set:
window.__FLARE_API_BASE__ = "YOUR_HTTP_API_URL"
Use no trailing slash.
If you later proxy /lookup through the same CloudFront distribution, you can set:
window.__FLARE_API_BASE__ = ""
and use relative /lookup.
Upload at least:
index.htmlfodmap.htmlceliac.htmlcrohns.htmlapp.jsstyles.css
Recommended hosting is S3 with CloudFront and HTTPS.
- Keep Lambda IAM permissions least-privilege, including read-only DynamoDB access where possible
- Restrict
CorsAllowOriginto your production HTTPS domain - Configure AWS Budgets and billing alerts
- Never commit secrets or tokens to the repository