-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdeploy_backend.sh
More file actions
19 lines (14 loc) · 781 Bytes
/
deploy_backend.sh
File metadata and controls
19 lines (14 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
####################################################################################################
# STEPS EXECUTED TO DEPLOY THE BACKEND PROJECT (SIMPLIFIED WITHOUT POETRY TOOL)
####################################################################################################
# Install Python dependencies with PIP (other tools like Poetry can be used)
pip install -r requirements.txt
# Configure deployment environment
export AWS_DEFAULT_REGION=us-east-1
export DEPLOYMENT_ENVIRONMENT=prod
# Initialize CDK (Cloud Development Kit)
ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
cdk bootstrap aws://${ACCOUNT_ID}/us-east-1
# Deploy the backend
cdk deploy "fastapi-todo-app-backend-${DEPLOYMENT_ENVIRONMENT}" --require-approval never