Deploy Project

Jets Account

You will need a Jets account to deploy. You can sign up at New users get a 14-day free trial period for their AWS account.


Let’s deploy the project to AWS Lambda.

❯ jets deploy

The deploy command shows the stack that will be deploy and ask if you are sure.

❯ jets deploy
Will deploy rails-dev
Are you sure? (y/N) y

Type y and press enter to kick off the deploy.

Are you sure? (y/N) y
Syncing bootstrap: rails-dev
Waiting for stack to complete
06:00:06PM CREATE_IN_PROGRESS AWS::CloudFormation::Stack rails-dev User Initiated
06:00:30PM CREATE_COMPLETE AWS::CodeBuild::Project Codebuild
06:00:35PM CREATE_COMPLETE AWS::S3::Bucket S3Bucket
06:00:36PM CREATE_COMPLETE AWS::CloudFormation::Stack rails-dev
Stack success status: CREATE_COMPLETE
Packaging code for deploy: rails-dev
Started remote run for deploy
Ctrl-C will stop showing logs. Jets will continue to run remotely.
If you want to stop the remote process, use: jets stop
Console Log Url:
Phase: SUBMITTED Status: SUCCEEDED Duration: 0s
Phase: QUEUED Pending
Phase: QUEUED Status: SUCCEEDED Duration: 0s
Phase: PROVISIONING Status: SUCCEEDED Duration: 9s
[Container] 2024/05/22 18:00:51.038105 Running command ./jets-go deploy
Extracting code
Running: jets-remote deploy
Syncing bootstrap: rails-dev
Building docker image: rails-dev-build-90c85527
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#22 [build 10/16] RUN bundle install
#27 [build 15/16] COPY jets/scripts/ jets/scripts/
Built docker image: rails-dev-build-90c85527
=> docker tag rails-dev-build-90c85527
=> docker push
Building CloudFormation templates
Built CloudFormation templates at /tmp/jets/rails-dev/templates
Deploying app: rails-dev
Waiting for stack to complete
06:02:30PM UPDATE_IN_PROGRESS AWS::CloudFormation::Stack rails-dev User Initiated
06:04:29PM UPDATE_COMPLETE AWS::CloudFormation::Stack rails-dev
Stack success status: UPDATE_COMPLETE
Release 1:
Prewarming application
Lambda Url

How Jets Deployment Works

  1. Jets first creates a bootstrap stack to create an S3 bucket and CodeBuild project.
  2. It packages up your code to a zip file and uploads it S3 for deployment.
  3. The rest of the deploy runs on the CodeBuild Remote Runner. It analyzes your source code, uses Docker to build dependencies, and deploys with CloudFormation to your AWS account.

Serverless Resources like AWS Lambda Functions, CloudWatch Event Rules, CloudFront Distributions, SQS Job Queues are created based on what you’ve configured. At the end, you see an AWS Lambda Function URL that points to your deployed app.

Tip: For faster deploys, you can use a Remote Docker Daemon or CodeBuild Fleets. This speeds up the build times since Docker caches can be reused.

Release History

A release record is created at the end of the deployment. You can see the release history with:

❯ jets release:history
Releases for stack: rails-dev
| Version |     Status      |  Released At  | Message |
| 1       | UPDATE_COMPLETE | 8 minutes ago | Deploy  |

For detailed information about each release you can also use jets release:info. You can also rollback to previous code and infrastructure with jets rollback if needed.

Next, we’ll review the deployed project.