-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·40 lines (33 loc) · 1.07 KB
/
build.sh
File metadata and controls
executable file
·40 lines (33 loc) · 1.07 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
38
39
40
#!/bin/bash
# Screenshot API Build Script for AWS Lambda
set -e
echo "🚀 Building Screenshot API for AWS Lambda..."
# Check if cargo-lambda is installed
if ! command -v cargo-lambda &> /dev/null; then
echo "📦 Installing cargo-lambda..."
cargo install cargo-lambda
fi
# Clean previous builds
echo "🧹 Cleaning previous builds..."
cargo clean
# Build for Lambda
echo "🔨 Building for Lambda runtime..."
cargo lambda build --release
echo "✅ Build complete!"
echo ""
echo "🚀 Ready for deployment!"
echo ""
echo "💡 Deploy using cargo-lambda:"
echo " cargo lambda deploy --iam-role arn:aws:iam::YOUR_ACCOUNT:role/lambda-execution-role"
echo ""
echo "Or deploy with custom settings:"
echo " cargo lambda deploy \\"
echo " --iam-role arn:aws:iam::YOUR_ACCOUNT:role/lambda-execution-role \\"
echo " --memory 1024 \\"
echo " --timeout 30 \\"
echo " --env-var RUST_LOG=info"
echo ""
echo "📋 Next steps after deployment:"
echo " 1. Note the Lambda function ARN from the output"
echo " 2. Set up API Gateway integration"
echo " 3. Test your endpoint!"