This guide provides instructions for deploying the backend CDK code and the frontend React application for the Bedrock Models project.
- Open AWS CloudShell in your target account.
- Clone the repository:
git clone https://github.com/ASUCICREPO/bedrock-models
- Navigate to the project directory:
cd bedrock-models/bedrock-models-cdk-app
- Set up the Python virtual environment:
python3 -m venv .venv source .venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Bootstrap the CDK (if not done before):
cdk bootstrap
- Deploy the stack:
cdk deploy
- Confirm the deployment when prompted.
- Save the output URLs for frontend deployment.
- Install Node.js and npm from https://nodejs.org
- Verify installation:
node -v npm -v
- Clone the repository locally:
git clone https://github.com/ASUCICREPO/bedrock-models
- Navigate to the frontend folder:
cd frontend
- Install dependencies:
npm install
- Create and update the
.env
file:Add the following lines to thetouch .env
.env
file:REACT_APP_MODEL_INFORMATIONS=<List models functional URL> REACT_APP_CONVERSE_API=<Converse bedrock functional URL>
- Test the app locally:
npm start
- Build the app:
npm run build
- Install Amplify CLI:
npm install -g @aws-amplify/cli
- Navigate to the build folder:
cd build
- Zip the contents:
zip -r Interactive-ai-app-build.zip ./*
- Open the AWS Amplify Console.
- Click "Create new app" > "Deploy without Git" > Next.
- Name your application.
- Drag and drop the
Interactive-ai-app-build.zip
file. - Click "Deploy".
- Monitor the deployment process.
- Use the provided URL to access your hosted React app.