Medusa won the Golden Kitty Award for Best Ecommerce Product ✨ Learn More
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:
Microtica 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).
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:
To follow through with this tutorial, here’s a list of things you should have/do.
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.
This template creates the following infrastructure resources that will be provisioned on your AWS account:
The steps to deploying a new Medusa server are outlined below.
Connect your preferred Git account. Microtica will create a repository on your Git account with a default repo name medusa-server
.
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.
Environment variables can be updated, added, or configured after deployment as well.
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.
Finally, a deployment summary of what will be provisioned on your AWS account is presented.
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.
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.
After the deployment is finished, navigate to Resources → AppName → 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
.
The image below shows how your environment should look after deploying both templates.
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.
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 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.