Deploying
Deploy, redeploy, and roll back across stages — with zero downtime and a clean CI/CD path.
Deploy & redeploy
laminar deploy <stage> is idempotent — run it again to redeploy. The CLI packages your project, uploads the artifact, and asks the Laminar API to create or update the stage.
laminar deploy dev
laminar deploy production
LAMINAR_API_TOKEN=... laminar deploy productionStrategies (Fargate)
Choose how the ECS service updates with --strategy:
laminar deploy production --strategy rolling # default, zero-downtime
laminar deploy production --strategy force # force a new deployment
laminar deploy production --strategy recreate # delete + recreate the serviceLambda is always zero-downtime (versions + alias). EC2 is blue/green by default.
Rollback
laminar rollback-cmd production # Lambda: alias → previous version
# Fargate: revert to previous task definitionFor EC2, re-deploy the previous version (deploys are blue/green). A failed EC2 deploy auto-terminates the new instance so nothing is left billed.
Stages
Each environment is a stage with its own config (see Configuration).
laminar environments # list configured stages
laminar add staging # add a stage to laminar.yml
laminar deploy staging
laminar destroy staging # tear down a stageCI/CD (GitHub Actions)
Use a Laminar CLI token for deployment auth. Keep AWS OIDC when the workflow also needs AWS identity for preflight checks or account-specific steps; do not store AWS access keys in GitHub.
name: Deploy
on:
push:
branches: [production]
permissions:
id-token: write # AWS OIDC
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- uses: actions/setup-python@v5
with: { python-version: "3.12" }
- run: pip install laminar-cli
- run: laminar link ${{ secrets.LAMINAR_PROJECT_ID }}
- run: laminar deploy production
env:
LAMINAR_API_TOKEN: ${{ secrets.LAMINAR_API_TOKEN }}
LAMINAR_API_URL: https://api.laminar.rocks/api/v1Create the token in Dashboard → Settings → CLI access tokens, then store it as a GitHub secret named LAMINAR_API_TOKEN. Store the linked project id as LAMINAR_PROJECT_ID.
Backups
laminar backup production
laminar list-backups production
laminar restore production