lamia-cloud¶
Cloud scheduling for Lamia scripts. Scripts run entirely in the cloud — no local machine needed. Currently supports GCP.
Installation¶
Configuration¶
Add a cloud section to your project's config.yaml:
| Field | Required | Description |
|---|---|---|
provider |
yes | Cloud provider (gcp) |
project_id |
yes | Your GCP project ID |
location |
yes | Region for scheduling and execution (e.g. us-central1) |
Authentication¶
lamia-cloud uses Application Default Credentials. Authenticate once:
For CI/CD environments, use a service account with the following roles:
- roles/cloudfunctions.developer
- roles/cloudscheduler.admin
- roles/iam.serviceAccountUser
Usage¶
That's it. lamia-cloud handles the full deployment:
1. Packages your .lm script and its project directory
2. Deploys a Cloud Function with the lamia runtime
3. Creates a Cloud Scheduler job that triggers the function on your cron schedule
All other commands work transparently:
lamia schedule list # shows both local and cloud jobs
lamia schedule update <id> --cron "0 12 * * *"
lamia schedule remove <id> # tears down the cloud function + scheduler job
How It Works¶
lamia schedule add --remotepackages your script into a Cloud Function deployment- The function includes the
lamiaruntime — your script runs identically to local execution - Cloud Scheduler triggers the function on the configured cron
- Logs (stdout/stderr) go to Cloud Logging under the function's log stream
- Exit status is reported back to the local lamia registry so
lamia schedule listshows it
Logs¶
View execution logs:
Or directly in GCP Console under Cloud Functions > lamia-schedule-
API Enablement¶
lamia-cloud automatically enables the required APIs (cloudfunctions, cloudscheduler, cloudbuild) on first use if your credentials have sufficient permissions. If auto-enablement fails:
gcloud services enable cloudfunctions.googleapis.com cloudscheduler.googleapis.com cloudbuild.googleapis.com --project=my-gcp-project
Limitations¶
- Cloud schedules ignore the
catch_upflag (Cloud Scheduler guarantees execution) @reboot/on-wakepresets are not supported in cloud mode- Scripts using browser automation (Selenium) require additional configuration for headless Chrome in the cloud environment
- Only GCP is supported currently; additional providers may be added in future versions
Releasing New Versions¶
lamia-cloud uses git tags for versioning. To release:
The CI pipeline automatically builds and publishes to PyPI on tagged pushes.