c5.metal instance costs ~$4.08/hr. Leaving it running 24/7 is expensive for development and testing.
Automated scheduling with cron.sh
To automatically start the instance at 8 AM ET and stop at midnight ET on weekdays:What cron.sh creates
Elastic IP
Allocates an Elastic IP for stable addressing across stop/start cycles. Updates
infra/.instance with the EIP.IAM role
Creates
nightshift-lambda-role with EC2 start/stop permissions scoped to instances tagged nightshift-dev.The Lambda functions find instances by tag (
Name: nightshift-dev), not by hardcoded instance ID, so they continue to work if you reprovision.