โ† Back to list

๐Ÿš€ How to Deploy a Bun Website on AWS Amplify

In the ever-evolving JavaScript ecosystem, Bun has quickly made a name for itself with blazing-fast performance and a developer-friendlyโ€ฆ

Shubham Gupta ยท 2025-06-21 18:15 ยท 5 claps ยท 2.4 min read
#aws-amplify #vue-3 #nuxtjs #bun-runtime #devops
Open on Medium โ†—
Wiki topics: ๐ŸŒ ยท Web Development โ˜๏ธ ยท DevOps & Cloud

๐Ÿš€ How to Deploy a Bun Website on AWS Amplify

In the ever-evolving JavaScript ecosystem, **Bun has quickly made a name for itself with blazing-fast performance and a developer-friendly experience. If youโ€™re experimenting with Bun and wondering how to deploy your project effortlessly, AWS Amplify** offers a powerful and easy-to-use hosting platform.

In this article, Iโ€™ll walk you through the steps to deploy a Bun-powered website to AWS Amplify.

๐Ÿ”ง Prerequisites

Before we get started, make sure you have the following:

  • A Nuxt 3 project built with Vue 3, using Vite as the build tool and running on the Bun runtime.

(This is the stack weโ€™ve used in our project, and it works great together!) If you donโ€™t have one yet, you can follow along with this sample project.

  • A GitHub account (Amplify connects directly to your repo)
  • An AWS account with access to Amplify

๐ŸŽฏ Deploy with AWS Amplify

  1. Select Your Source Code Provider

In this example, weโ€™re using GitHub as our source code provider. Choose GitHub, authorize Amplify if prompted, and proceed to the next step.

  1. Choose Repository & Branch

Select the repository and the branch (usually develop or main) you want to deploy.

  1. Configure App Settings (Amplify Build Settings)

If your repository does not already contain an amplify.yml file, AWS Amplify will auto-generate one for you in the Console UI.

โš ๏ธ If you include your own amplify.yml in the GitHub repo, Amplify will completely ignore the default settings from the Console and follow your YAML file instead โ€” including the install, build, test, and deploy steps.

You can refer to the custom amplify.yml file we used below (adjust based on your project structure):

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - curl -fsSL https://bun.sh/install | bash
        - export BUN_INSTALL="$HOME/.bun"
        - export PATH="$BUN_INSTALL/bin:$PATH"
        - bun install
    build:
      commands:
        - export BUN_INSTALL="$HOME/.bun"
        - export PATH="$BUN_INSTALL/bin:$PATH"
        - bun run build
  artifacts:
    baseDirectory: .amplify-hosting
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*
      - ~/.bun/**/*
  1. Finalize & Deploy

Once all the settings are configured, review the summary.

Click โ€œSave and deployโ€ โ€” Amplify will start the build process, and your Bun-powered Nuxt site will be live in just a few minutes!

๐Ÿงช Troubleshooting Tips

  • Bun not found in build environment? Be sure your curl install script runs as a preBuild hook in the Amplify amplify.yml.
  • Wrong output path? Nuxtโ€™s output directory is .output/public by default โ€” but confirm this in your Amplify build.

๐Ÿ™Œ Letโ€™s Connect

If youโ€™re building with Bun or exploring modern deployment workflows, Iโ€™d love to hear your thoughts! Drop a comment, connect on LinkedIn.


๋ฉ”ํƒ€๋ฐ์ดํ„ฐ
post_id
9853484d68f6
slug
how-to-deploy-a-bun-website-on-aws-amplify-9853484d68f6
url
https://medium.com/@shubhamgupta5/how-to-deploy-a-bun-website-on-aws-amplify-9853484d68f6
canonical_url
https://medium.com/@shubhamgupta5/how-to-deploy-a-bun-website-on-aws-amplify-9853484d68f6
author_url
https://medium.com/@shubhamgupta5
status
ok
fetched_at
2026-07-29 20:50:29