Deploy Strapi On Aws

screenshot of Deploy Strapi On Aws

Deploy Strapi On Aws

Deploying a Strapi API on AWS (EC2 & RDS & S3)


This repository provides a guide on how to deploy a Strapi API on AWS using EC2, RDS, and S3. The goal is to build a HTTPS-secured Strapi API with development, staging, and production modes. The guide assumes that the user has basic familiarity with AWS and everything done in the guide is eligible for AWS Free Tier.


  • Create EC2 instance, RDS instance, and S3 bucket
  • Point domain to EC2 instance
  • Warm up EC2 by installing Nginx, nvm, Node.js, and PM2
  • Install Certbot for HTTPS encryption
  • Create a local Strapi project


  1. Create EC2 instance:
    • Click on "Launch Instance" button
    • Choose AMI: Ubuntu Server 18.04 LTS (HVM), SSD Volume Type
    • Choose Instance Type: General purpose, t2.micro
    • Configure Instance, Add Storage, Add Tags, Configure Security Group
    • Review and click "Launch" button
    • Newbies: Choose "Create a new key pair named strapi-cms", download it as "strapi-cms.pem"
    • Veterans: Choose as you like and click "Launch Instances" button
  2. Create RDS instance:
    • Click on "Create database" button
    • Select engine: PostgreSQL
    • Choose use case as you like
    • Specify DB details: DB engine version, DB instance class, Multi-AZ deployment, Storage, DB instance identifier, Master username, Password
    • Configure advanced settings: Public accessibility, Database name, Monitoring & Maintenance window
    • Click "Create database" button
    • In Security groups, edit inbound rules to allow PostgreSQL (5432) from anywhere
    • Create databases for dev & staging modes
  3. Create S3 bucket:
    • Click on "Create bucket" button
    • Set bucket name and region
    • Configure options and set permissions
    • Click "Create bucket" button
  4. Point domain to EC2 instance by updating A / CNAME records to the EC2's IPv4 Public IP / Public DNS (IPv4)
  5. Warm up EC2:
    • Login to EC2
    • Update the system
    • Install Nginx
    • Install nvm, Node.js, and PM2
    • Install Certbot for HTTPS encryption
  6. Create a local Strapi project by installing Strapi


This guide provides step-by-step instructions on how to deploy a Strapi API on AWS using EC2, RDS, and S3. It covers the installation and configuration of EC2 instances, RDS instances, and S3 buckets. It also includes steps to point the domain to the EC2 instance, warm up the EC2 instance, and install Certbot for HTTPS encryption. The guide ends with instructions on how to create a local Strapi project.


Strapi is an open source headless CMS that provides a customizable content management system and API for your projects. It allows you to manage content in a visual interface and use a REST or GraphQL API to retrieve the data.


A website that uses GraphQL as a query language to manage data fetching and state management. This includes features such as a strongly typed schema, client-side caching, and declarative data fetching to streamline data management and optimize website performance.