Strapi deployment on AWS

@netchart I’ve done a similar setup using AWS Fargate. If it’s still relevant for you I can share the whole setup which is composed of multiple components (https://mk0microtica2di3k2co.kinstacdn.com/wp-content/uploads/2021/06/strapi-component-hl-arch.png):

  • VPC - all the infrastructure except the ALB runs on a private subnet
  • Fargate cluster + ALB
  • Amazon EFS - mounted on the container, a storage for the media files and database (for sqlite)
  • S3 bucket - if you choose to store media files on S3
  • RDS MySql - managed MySql database
  • Secret manager - for storing the database creds
  • plus some NodeJS scripts to create the initial database on RDS

The Dockerfile I am using is quite simple.

FROM strapi/base:alpine

WORKDIR /strapi

COPY ./package.json ./
COPY ./yarn.lock ./

RUN yarn install

COPY . .

ENV NODE_ENV development

RUN yarn build

EXPOSE 1337

CMD ["yarn", "develop"]

This is part of our free solution to deploy Strapi on AWS (Deploy Strapi on AWS with Microtica in less than 10 mins). It creates a set of CloudFormation stacks on your account, you can see the templates and how it’s all interconnected.

Hope this helps!

1 Like