Skip to content

Commit d55c40b

Browse files
wirjoJiaDe
authored andcommitted
feat: upgrade default instance to c7g.large, remove auto-update cron
- Default instance: r7g.medium -> c7g.large (2 vCPU better for Node.js + Docker sandbox concurrency) - Remove auto-update.sh cron — OpenClaw handles self-updates natively - Remove update log from CloudWatch collection - Update cost estimates (~$58-92/mo vs previous ~$30-84/mo) - Update parameter description to recommend compute-optimized
1 parent adcd9a6 commit d55c40b

1 file changed

Lines changed: 9 additions & 51 deletions

File tree

clawdbot-bedrock.yaml

Lines changed: 9 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ Parameters:
4141

4242
InstanceType:
4343
Type: String
44-
Default: "r7g.medium"
45-
Description: "Graviton (ARM) recommended. r7g/r6g = memory-optimized (recommended for stability). c7g = compute-optimized. t4g = burstable."
44+
Default: "c7g.large"
45+
Description: "Graviton (ARM) recommended. c7g = compute-optimized (recommended, 2 vCPU for Node.js + sandbox). r7g/r6g = memory-optimized. t4g = burstable."
4646
AllowedValues:
4747
- "t4g.small"
4848
- "t4g.medium"
@@ -1020,8 +1020,8 @@ Resources:
10201020
openclaw doctor --fix 2>&1 || echo "openclaw doctor completed with warnings"
10211021
'
10221022
1023-
# Install health check + auto-update cron
1024-
echo "[post] Installing health check and auto-update..."
1023+
# Install health check cron
1024+
echo "[post] Installing health check..."
10251025
cat > /opt/openclaw/health-check.sh << 'HEALTHCHECK'
10261026
#!/bin/bash
10271027
# OpenClaw Gateway Health Check
@@ -1088,49 +1088,8 @@ Resources:
10881088
HEALTHCHECK
10891089
chmod +x /opt/openclaw/health-check.sh
10901090
1091-
cat > /opt/openclaw/auto-update.sh << 'AUTOUPDATE'
1092-
#!/bin/bash
1093-
# OpenClaw Weekly Auto-Update
1094-
export HOME=/home/ubuntu
1095-
export NVM_DIR="$HOME/.nvm"
1096-
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
1097-
export XDG_RUNTIME_DIR=/run/user/1000
1098-
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
1099-
1100-
LOG="/var/log/openclaw-update.log"
1101-
1102-
CURRENT=$(openclaw --version 2>/dev/null || echo "unknown")
1103-
echo "$(date) Starting update check (current: $CURRENT)" >> $LOG
1104-
1105-
# Update OpenClaw (pin to same major year to avoid breaking changes)
1106-
MAJOR_YEAR=$(echo $CURRENT | cut -d. -f1)
1107-
UPDATE_TAG="latest"
1108-
if [ "$MAJOR_YEAR" != "unknown" ]; then
1109-
UPDATE_TAG="^$MAJOR_YEAR"
1110-
fi
1111-
1112-
ARCH=$(uname -m)
1113-
if [ "$ARCH" = "aarch64" ]; then
1114-
npm install -g openclaw@$UPDATE_TAG --timeout=300000 --ignore-scripts >> $LOG 2>&1
1115-
else
1116-
npm install -g openclaw@$UPDATE_TAG --timeout=300000 >> $LOG 2>&1
1117-
fi
1118-
1119-
NEW=$(openclaw --version 2>/dev/null || echo "unknown")
1120-
if [ "$CURRENT" != "$NEW" ]; then
1121-
echo "$(date) Updated: $CURRENT -> $NEW, restarting gateway" >> $LOG
1122-
sudo -H -u ubuntu bash -c "export XDG_RUNTIME_DIR=/run/user/1000; export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus; systemctl --user restart openclaw-gateway.service" 2>>$LOG
1123-
openclaw doctor --fix >> $LOG 2>&1 || true
1124-
else
1125-
echo "$(date) Already on latest: $CURRENT" >> $LOG
1126-
fi
1127-
AUTOUPDATE
1128-
chmod +x /opt/openclaw/auto-update.sh
1129-
11301091
# Health check every 5 minutes
11311092
(crontab -l 2>/dev/null; echo "*/5 * * * * /opt/openclaw/health-check.sh") | crontab -
1132-
# Auto-update weekly on Sundays at 4 AM UTC
1133-
(crontab -l 2>/dev/null; echo "0 4 * * 0 /opt/openclaw/auto-update.sh") | crontab -
11341093
11351094
# Install and configure CloudWatch Agent (conditional)
11361095
if [ "${EnableMonitoring}" = "true" ]; then
@@ -1160,8 +1119,7 @@ Resources:
11601119
"files": {
11611120
"collect_list": [
11621121
{ "file_path": "/var/log/openclaw-setup.log", "log_group_name": "/openclaw/setup", "log_stream_name": "{instance_id}", "retention_in_days": 30 },
1163-
{ "file_path": "/var/log/openclaw-health.log", "log_group_name": "/openclaw/health", "log_stream_name": "{instance_id}", "retention_in_days": 14 },
1164-
{ "file_path": "/var/log/openclaw-update.log", "log_group_name": "/openclaw/update", "log_stream_name": "{instance_id}", "retention_in_days": 30 }
1122+
{ "file_path": "/var/log/openclaw-health.log", "log_group_name": "/openclaw/health", "log_stream_name": "{instance_id}", "retention_in_days": 14 }
11651123
]
11661124
}
11671125
}
@@ -1312,19 +1270,19 @@ Outputs:
13121270
Description: "Estimated monthly cost (USD)"
13131271
Value: !Sub
13141272
- |
1315-
EC2 (${InstanceType}): ~$25-50 (r7g.medium ~$30, Graviton 20% cheaper than x86)
1273+
EC2 (${InstanceType}): ~$50-60 (c7g.large ~$58, Graviton 20% cheaper than x86)
13161274
EBS (30GB x2): ~$4.80
13171275
VPC Endpoints: ${EndpointCost}
13181276
Monitoring: ${MonitoringCost}
13191277
Bedrock: Pay-per-use
13201278
Total: ~${TotalCost}/month
1321-
Note: Memory-optimized (r7g/r6g) recommended for stability. Swap, health checks, and auto-updates are always enabled at no extra cost.
1279+
Note: Compute-optimized (c7g, 2 vCPU) recommended for running Node.js + Docker sandbox concurrently. Swap, health checks, and OS security patches are always enabled at no extra cost.
13221280
- EndpointCost: !If [CreateEndpoints, "~$29 ($0.01/hour x 5 endpoints)", "$0 (disabled)"]
13231281
MonitoringCost: !If [EnableCW, "~$4 (CloudWatch Agent + detailed monitoring + alarms + logs)", "$0 (disabled)"]
13241282
TotalCost: !If
13251283
- CreateEndpoints
1326-
- !If [EnableCW, "$59-84", "$55-80"]
1327-
- !If [EnableCW, "$34-55", "$30-55"]
1284+
- !If [EnableCW, "$91-96", "$87-92"]
1285+
- !If [EnableCW, "$63-67", "$58-63"]
13281286

13291287
InstanceArchitecture:
13301288
Description: "Instance architecture"

0 commit comments

Comments
 (0)