nvm install 20
nvm use 20
Or download from https://nodejs.org/
Check version:
node --version
npm --version
Expected result: v20.x and 10.x
brew install python@3.12
Ubuntu/Debian:
sudo apt-get install python3.12 python3.12-venv
Windows: Download from https://www.python.org/
Check version:
python3 --version
Expected result: Python 3.12.x
brew install awscli
Ubuntu/Debian:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
Windows: Download from https://aws.amazon.com/cli/
Check version:
aws --version
Expected result: aws-cli/2.x
brew install aws-sam-cli
Ubuntu/Debian:
pip install aws-sam-cli
Windows: Download from https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html
Check version:
sam --version
Expected result: SAM CLI 1.x
brew install git
Ubuntu/Debian:
sudo apt-get install git
Windows: Download from https://git-scm.com/
Check version:
git --version
Expected result: git version 2.x
If you don’t have one:
Do not use root account - Create an IAM user with necessary permissions:
# Or use AWS Console:
# 1. IAM → Users → Create user
# 2. Name: lexi-dev
# 3. Attach policies: AdministratorAccess (for development)
# 4. Create Access Key
aws configure
# Enter the following values:
# AWS Access Key ID: [Your Access Key]
# AWS Secret Access Key: [Your Secret Key]
# Default region name: ap-southeast-1
# Default output format: json
Verify configuration:
aws sts get-caller-identity
Lexi uses ap-southeast-1 (Singapore):
aws configure get region
Or set environment variable:
export AWS_REGION=ap-southeast-1
git clone https://gitlab.com/your-username/lexi-be.git
cd lexi-be
Or if already cloned:
cd lexi-be
git pull origin main
lexi-be/
├── src/ # Backend code (Python)
│ ├── domain/ # Business logic
│ ├── application/ # Services
│ ├── infrastructure/ # AWS handlers
│ │ ├── handlers/ # Lambda handlers
│ │ ├── repositories/ # DynamoDB access
│ │ └── services/ # AWS services
│ └── shared/ # Utilities
├── template.yaml # SAM template
├── samconfig.toml # SAM configuration
├── requirements.txt # Python dependencies
└── tests/ # Unit tests
pip install -r requirements.txt
Frontend dependencies (if available):
cd frontend
npm install
cd ..
aws cloudformation list-stacks \
--region <REGION> \
--query 'StackSummaries[?StackStatus!=`DELETE_COMPLETE`]' \
--output table
Expected result:
aws dynamodb list-tables --region <REGION>
Describe table:
aws dynamodb describe-table \
--table-name <TABLE_NAME> \
--region <REGION>
aws cognito-idp list-user-pools \
--max-results 10 \
--region <REGION>
Describe user pool:
aws cognito-idp describe-user-pool \
--user-pool-id <USER_POOL_ID> \
--region <REGION>
aws lambda list-functions \
--region <REGION> \
--output table
Describe specific function:
aws lambda get-function \
--function-name <FUNCTION_NAME> \
--region <REGION>
aws apigateway get-rest-apis \
--region <REGION>
Get API ID:
API_ID=$(aws apigateway get-rest-apis \
--region <REGION> \
--query 'items[0].id' \
--output text)
echo "API ID: $API_ID"
echo "API URL: https://$API_ID.execute-api.<REGION>.amazonaws.com/Prod/"
# Create .env file
cat > .env << EOF
# AWS Configuration
AWS_REGION=<REGION>
AWS_ACCOUNT_ID=<ACCOUNT_ID>
# DynamoDB
LEXI_TABLE_NAME=<TABLE_NAME>
# Cognito
COGNITO_USER_POOL_ID=<USER_POOL_ID>
COGNITO_APP_CLIENT_ID=<APP_CLIENT_ID>
# S3
SPEAKING_AUDIO_BUCKET_NAME=<BUCKET_NAME>
# Logging
LOG_LEVEL=INFO
# API Gateway
API_ENDPOINT=https://<API_ID>.execute-api.<REGION>.amazonaws.com/Prod/
WEBSOCKET_ENDPOINT=wss://<API_ID>.execute-api.<REGION>.amazonaws.com/Prod
# Bedrock
BEDROCK_MODEL_ID=us.amazon.nova-lite-v1:0
BEDROCK_REGION=<BEDROCK_REGION>
EOF
Note: Replace <...> with actual values.
source .env
Or export individual variables:
export AWS_REGION=<REGION>
export LEXI_TABLE_NAME=<TABLE_NAME>
aws sts get-caller-identity
Expected result:
{
"UserId": "AIDA...",
"Account": "<ACCOUNT_ID>",
"Arn": "arn:aws:iam::<ACCOUNT_ID>:user/<USERNAME>"
}
aws dynamodb scan \
--table-name <TABLE_NAME> \
--max-items 1 \
--region <REGION>
aws cognito-idp list-users \
--user-pool-id <USER_POOL_ID> \
--region <REGION>
aws s3 ls
List objects in bucket:
aws s3 ls s3://<BUCKET_NAME>/
Install extensions:
cat ~/.aws/credentials
Or reconfigure:
aws configure
python3 --version
Use nvm for Node.js:
nvm use 20
Use pyenv for Python:
pyenv install 3.12
pyenv local 3.12
pip install --upgrade aws-sam-cli
Or use Homebrew:
brew install aws-sam-cli
aws configure get region
Set region:
export AWS_REGION=ap-southeast-1
Or in command:
aws dynamodb list-tables --region ap-southeast-1
After completing setup, you should have:
📸 TODO: Add screenshot of terminal showing installed tools
📸 TODO: Add screenshot of aws sts get-caller-identity output
After setup, continue to Backend Deployment to start deploying Lambda functions.