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 hanami-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: hanami-dev
Waiting for stack to complete
03:45:54AM CREATE_IN_PROGRESS AWS::CloudFormation::Stack hanami-dev User Initiated
03:46:16AM CREATE_COMPLETE AWS::CodeBuild::Project Codebuild
03:46:17AM CREATE_COMPLETE AWS::CodeBuild::Project CodebuildLambda
03:46:21AM CREATE_COMPLETE AWS::S3::Bucket S3Bucket
03:46:22AM CREATE_COMPLETE AWS::CloudFormation::Stack hanami-dev
Stack success status: CREATE_COMPLETE
Packaging code for deploy: hanami-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 03:46:40.919678 Running command ./jets-go deploy
Extracting code
Running: jets-remote deploy
Building docker image: hanami-dev-build-33105d4d
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#6 [internal] load metadata for
#22 [build 11/16] RUN bundle install
#26 [build 15/16] RUN yarn install
#27 [build 16/16] RUN bundle exec hanami assets compile
Built docker image: hanami-dev-build-33105d4d
=> docker tag hanami-dev-build-33105d4d
=> docker push
Building CloudFormation templates
Built CloudFormation templates at /tmp/jets/hanami-dev/templates
Deploying app: hanami-dev
Waiting for stack to complete
03:48:14AM UPDATE_IN_PROGRESS AWS::CloudFormation::Stack hanami-dev User Initiated
03:50:13AM UPDATE_COMPLETE AWS::CloudFormation::Stack hanami-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: hamami-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.