Deploy Strapi on AWS with Microtica in 10 minutes
Tags: strapi, headlesscms, aws, devops
Published: 2021-06-21 15:23:55

[Strapi](https://strapi.io) is an open-source headless CMS built with NodeJS. Using Strapi you can easily design and publish the content consumed by your apps via API. Strapi provides a great admin UI portal where you can design your data models, create and manage content.

The benefits of using Microtica for your Strapi projects are the simplicity of setup and low maintenance while having the infrastructure on your own AWS account. We are following the GitOps and declarative infrastructure approach for stable, more reliable, and predictable deployments.

Microtica offers two ready-to-use templates to deploy your Strapi application. The first one is based on Kubernetes and the second is a serverless solution with AWS Fargate.

[**Deploy Strapi on AWS Now**](https://bit.ly/3NYoLII)

## Serverless Strapi on AWS 
With this approach, Strapi can coexist with your existing AWS infrastructure and you always have the flexibility to extend this setup with additional cloud resources.

> Infrastructure ownership 
> The Strapi infrastructure will be provisioned on your own AWS account. You retain full control over your infrastructure and data while getting all the benefits of infrastructure automation.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kx5ogumvcyhv612f7zcw.png) 

Microtica provides a built-in template that provisions the necessary infrastructure to run Strapi on your AWS account in a scalable, secure, and reliable way with zero downtime deployment.

To deploy the infrastructure you need to select the [Strapi Serverless Template](https://bit.ly/3NYoLII). 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4cepszelfe11813rxnxk.png) 

Follow the steps in the template to deploy the Strapi app on your AWS account.

### 1. Create Git Repository
As a first step, you need to connect a Git account (GitHub, Bitbucket, or GitLab). Microtica defines a repository name by default for each template, but you can change it. If you already have a Git account connected to Microtica, you can choose it from the list. We will create a new repository on your account with the provided name, and every Git push will be deployed automatically in Microtica.

### 2. Configure Template
The second step is to configure the environment variables for this template. Variables provide a way to customize a template to meet your requirements. 

For example, here is where you configure the scaling parameters for your Strapi app. You can scale your app vertically and horizontally. For vertical scaling, update the ***CPU*** and ***Memory*** configuration in this section. For horizontal scaling, update the number of ***desired replicas*** in the same section.

In this section you can also choose the database client - *sqlite* is the default option.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3g2zehihoowygsngmp50.png) 

You can update the configuration later as well.

### 3. Configure Environment
After configuring the template, you will need to select an environment where the template will reside. Environments are a great way to separate your development and production applications. If you need to create a new environment, you can enter the environment name and description and click the Select button. You can also choose an existing environment if you have created one previously. 

Next, you need to configure the target AWS account where your Strapi infrastructure will be provisioned. Here is a quick guide on [How to Connect your AWS account](https://bit.ly/3yttgp3).

### 4. Deploy 
Once your AWS account is connected and configured in the environment, click on the ***Deploy*** button to trigger the deployment.

***It takes up to 10 mins to create a live Strapi environment.***

You can follow the pipeline logs inline, and monitor your deployment in real-time. 

Once the template deployment finishes, you can find the access URL in *Environment* > *Infrastructure* > *ContainerRunner* view, under *Resource outputs*, the ***AccessURL*** parameter. Copy-paste it in the browser to see your Strapi Demo app.  

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8japxlmbg520slyzfey1.png)

*Microtica uses Strapi v4 as a default version for the Strapi Serverless template.*

Read more about our Strapi Serverless template in [our documentation](https://bit.ly/3uD34Hs).