-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
Β·37 lines (30 loc) Β· 1.02 KB
/
Copy pathdeploy.sh
File metadata and controls
executable file
Β·37 lines (30 loc) Β· 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# AWS SAM deployment script for News Classification API
echo "π Deploying News Classification API..."
# Check if SAM CLI is installed
if ! command -v sam &> /dev/null; then
echo "β AWS SAM CLI is not installed. Please install it first:"
echo " pip install aws-sam-cli"
exit 1
fi
# Check if AWS CLI is configured
if ! aws sts get-caller-identity &> /dev/null; then
echo "β AWS CLI is not configured. Please run 'aws configure' first."
exit 1
fi
# Build the SAM application
echo "π¦ Building SAM application..."
sam build
# Deploy the application
echo "π Deploying to AWS..."
sam deploy --guided
echo "β
Deployment complete!"
echo ""
echo "π Next steps:"
echo "1. Note the API endpoint URL from the outputs above"
echo "2. Test your API with:"
echo " curl -X POST [API_URL] \\"
echo " -H 'Content-Type: application/json' \\"
echo " -d '{\"query\": {\"headline\": \"Stock market crashes\"}}'"
echo ""
echo "3. Make sure your SageMaker endpoint is deployed and running!"