Welcome to the Museum Visit Planner (named since this is an MVP minimal viable product :) ). This application will let you plan a trip to a museum exhibition, including weather forecast information for the exhibition location.
Deployed frontend: link
Deployed backend API: link
This repo contains two projects:
-
A serverless
backend
application, written in Python, that includes:- An AWS Lambda to retrieve Exhbition data from the Harvard Art Museum API and store in DynamoDB.
- An AWS Lambda to retrieve weather data for each Exhbition venue from Open Meteo, and enrich the items in DynamoDB.
- An AWS Lambda running FastAPI to expose rest based API, via an AWS API Gateway.
-
A
frontend
application, written using React + Vite template, that queries the Rest API backend.
- Backend: Cloud Native Services
- AWS Lambda
- AWS DynamoDB (via boto3 client)
- AWS Api Gateway
- AWS Secrets Manager
- AWS Event Bridge Rules
- Infrastructure as Code
- AWS CDK
- Frontend:
- React + Vite
- AWS Amplify for deployment and hosting
- An AWS Account with credentials configured locally.
aws cli
installed locally link.- Python installed locally (recommend using pyenv).
Node
v22 installed locally (recommend using nvm).- CDK installed locally link.
- Create a Secret for the Harvard Art Museum API key to avoid committing it to GitHub.
- Set up AWS Amplify to deploy frontend app on push to main branch in GitHub repo. Follow the steps here
- Create an IAM User for credentials to use when pushing from CDK locally.
Build and deploy the backend
using the Makefile commands, found in the backend
directory.
Run the FastAPI locally
make run
Deploy to AWS using CDK
make full-clean-deploy
Clean up
make clean
Run locally, in frontend
directory:
npm run dev
Note: this instructions are for mac os local environment.
brew update
brew install pyenv
Configure pyenv for your choice of terminal e.g. for ksh
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init - zsh)"' >> ~/.zshrc
Use pyenv to download 3.12 version of Python.
pyenv install 3.12
Set this version of Python to be used:
pyenv local 3.12
Check that it's set
python --version
should output something like:
julianleonard@Julians-Laptop museum-visit-planner % python --version
Python 3.12.8
To use CDK you will need to install Node. I recommend using nvm
(https://github.com/nvm-sh/nvm) to install and manage your node version (similar to pyenv
above). For this case study I am using node v.22.11.0
.
Also, this readme assumes you have an AWS account and the aws cli
installed already: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
Install the CDK:
npm install -g aws-cdk
Check the version that is installed:
(myenv) julianleonard@Julians-Laptop museum-visit-planner % cdk version
2.177.0 (build b396961)
If you working in an AWS environment which has not been bootstrapped for CDK, you'll need to run this command: cdk bootstrap aws://<aws-account-id>/<region>
e.g.
cdk bootstrap aws://1234567890/eu-central-1