---
title: "A Step-by-Step Tutorial on How to Deploy a Medusa Server on AWS"
description: "Learn how to deploy Medusa on AWS with Microtica"
url: https://medusajs.com/blog/a-step-by-step-tutorial-on-how-to-deploy-a-medusa-server-on-aws
last_updated: 2026-08-13T14:19:41Z
---

# A Step-by-Step Tutorial on How to Deploy a Medusa Server on AWS

_Published 2023-01-16 by Marija Naumovska in Ecosystem_

> **Notice** Medusa is under active development, so the content of this post may be outdated. Please check out our documentation instead.
>
> [Go to Docs](http://docs.medusajs.com)

[Medusa](https://github.com/medusajs/medusa) is an open source composable commerce platform built for developers. Its architecture is flexible enabling users to build bespoke commerce solutions.

Medusa is composed of three components:

1. A headless backend engine that holds all the logic and data of the store and exposes APIs to communicate with the admin and storefront,
2. An admin dashboard that allows store operators to manage their orders and products, and
3. A storefront, which is ultimately an ecommerce website where customers can preview products and make orders.

## What is Microtica?

[Microtica](https://www.microtica.com/) is a developer self-service platform that enables you to self-host open source solutions on AWS (Amazon Web Services) without being a cloud expert.

The platform provides production-ready templates for development frameworks and solutions, so you can get started fast and be free from the friction of dealing with the underlying cloud complexities.

Using the templates, you can deliver on your own AWS account and deploy applications/services on Amazon EKS (Elastic Kubernetes Service).

## Why Should You Deploy Medusa Server on AWS?

Here are some of the reasons why it would be a good idea to deploy a Medusa.js Server on AWS with Microtica’s template:

- Out-of-the-box serverless infrastructure with Fargate
- Infrastructure and data ownership on your AWS account
- Auto-scaling based on application load
- Automated git-push deployments and rollbacks
- Production-ready solution
- Resource monitoring and performance insights in-app

## Prerequisites

To follow through with this tutorial, here’s a list of things you should have/do.

- Have a Git account; any provider from GitHub, BitBucket, GitLab, and CodeCommit is supported.
- [Create a Microtica account](https://app.microtica.com/auth/signup?utm_source=devto&utm_medium=blog&utm_campaign=deploy+medusa+on+aws) by signing up with your email or your Git account.
- Have an AWS account to be able to deploy a React app to your AWS account. You can [sign up for an AWS account here.](https://aws.amazon.com/)

## Deploy a New Medusa Server

After creating a Microtica account, click the _Deploy with Microtica_ button to land on the _Templates_ page, where you can see a list of all production-ready templates.

![THXCHbFZq6](https://assets.medusajs.com/uploads/2024/06/d4a28ae5e43a8e3673ba7ff87173f98ac8411007-880x191-ihyng8eb.webp)

This template creates the following infrastructure resources that will be provisioned on your AWS account:

- VPC, subnets and networking
- Container infrastructure based on Fargate
- Application load balancer
- Persistent storage
- S3 bucket
- Postgres database
- Redis (in production mode)

The steps to deploying a new Medusa server are outlined below.

### Create a Git Repository

Connect your preferred Git account. Microtica will create a repository on your Git account with a default repo name `medusa-server`.

![nTZPm9Fyis](https://assets.medusajs.com/uploads/2024/06/284cd81511bc4ed139eb1b587e8a3d719764148a-769x310-u75m6v3u.webp)

### Configure Template

Here, you can customize the template for your needs by providing environment variables. Enter an application name and the admin credentials that will be used to create an initial admin user with which you can later sign in to your Medusa Admin.

Select whether you want a production Medusa Server environment or a development one. In production mode, this template will provision managed RDS PostgreSQL and Redis instances. In development mode, the template will use local SQLite and a fake Redis instance.

![ujvPPLbsyo](https://assets.medusajs.com/uploads/2024/06/9bcf68ec74f28fd50419d68b5006f666068fc282-768x573-2ek2z6m3.webp)

Environment variables can be updated, added, or configured after deployment as well.

### Connect an AWS account

In the last step, you can select the environment in which you want to deploy the template. An existing default environment called `development` will be preselected here or you can create a new environment.

Connect your AWS account when prompted. This process takes only a few seconds, so afterwards, only choose the region you want to deploy in.

![rHQmxc0rBJ](https://assets.medusajs.com/uploads/2024/06/a28573ace9f2b79d22a464e20d421108a0a7cd3a-784x435-9keycen0.webp)

### Deploy the Medusa Server Template to AWS

Finally, a deployment summary of what will be provisioned on your AWS account is presented.

![vwUF_K9zRz](https://assets.medusajs.com/uploads/2024/06/fd8a5d82ce64810baee27e9a6ea717ec89981c17-799x536-4h12u9ds.webp)

Clicking the _Deploy_ button will trigger a deployment of the template and start creating the infrastructure for a Medusa Server.

It will take about 10 mins for the solution to be deployed on the cloud; you can follow the build pipeline in real time by clicking the _View Logs_ button.

![TcfKjLjkLe](https://assets.medusajs.com/uploads/2024/06/c32e31f6ec31aee490b12f290e4931e8d3a13de9-880x384-8xs418uy.webp)

Once the build process is complete, a new deployment with the infrastructure resources is triggered. You can follow the logs of the deployment process by clicking the _View deployment_ button, and then selecting the deployment from the list.

![thr0qC6h4m](https://assets.medusajs.com/uploads/2024/06/419c2efb99ace3d2e9077782b2656f8787ab0303-880x594-92354jiq.webp)

### Preview the Environment

After the deployment is finished, navigate to _Resources_ → [_AppName_](https://dev.tomedusa%20in%20our%20case/) → _Overview_, and under _Resource Outputs_ you should see the AccessUrl.

This is the server URL that you can use to access API endpoints. Try getting the list of products using the endpoint `/store/products`.

![Y284EZGh1U](https://assets.medusajs.com/uploads/2024/06/34c2b6fb1b4b1e0b2d3904b769b8d33e14fbe50a-880x96-8kqhc8nz.webp)

The image below shows how your environment should look after deploying both templates.

![jNxhPN9Afv](https://assets.medusajs.com/uploads/2024/06/2020be1e5255d74c0644113a861f4ce3ad114642-880x420-63v08v49.webp)

## Cleanup

To remove all the resources created on your AWS account, navigate to your environment → _Environment Settings_ → _Infrastructure_, and you’ll see the _Undeploy_ section.

This will clean up the resources created in AWS, but you will still have the configuration in Microtica in case you want to deploy it in the cloud again.

## Deploy an Existing Medusa Server

If you already have an existing Medusa server repository that you want to migrate to AWS, there are several changes you need to make to your source code. You can follow [the documentation](https://docs.microtica.com/medusa-server?utm_source=devto&utm_medium=blog&utm_campaign=deploy+medusa+on+aws) to configure and import your Medusa server repo code.

> Should you have any issues or questions related to Medusa, then feel free to reach out to the Medusa team via [Discord](https://discord.gg/F87eGuwkTp).
