How to Deploy Shopify App on AWS Amplify

how to deploy shopify app on aws amplify

Deploy Shopify App on AWS Amplify is easy. We all know that AWS comes with powerful services and one of them is Amplify server-less container providing us with the ability to deploy Shopify apps using AWS Fargate without requiring a high level of control

Prerequisites :

  • Install Amplify CLI by running :

In order to deploy the Shopify app, Amplify the package “web” folder with Docker and push it into the S3 deployment bucket, This will trigger a code pipeline process in order to build the code’s app and stores the result in ECR, then deploy it to Fargate Task on an ECS Cluster fronted by an Amazon API Gateway HTTPS API using a direct cloud Map integration to a VPC Link

How to Deploy Shopify App on AWS Amplify

Setup a new Amplify project :

First of all, you need to Initialize an Amplify project by typing

container-based deployment is not enabled by default, to activate that feature run the command below.

and choose “Advanced: Container-based deployments”

After that you are going to add a custom Rest app template using API Gateway + Fargat with “amplify add api” command and choose the following options :

After successful completion, you will see a new folder called “API” added to your project with the following structure image

The “API” folder contained “src” folder that will hold your Shopify app files.

Your next step is moving “web” folder of the Shopify app inside “src” folder, Shopify app already comes with .Dockerfile so you need to copy and past it beside “src” folder then you need to add our ENV Variables, “.Dockerfile” will be like this

Then Deploy your App using the following command.

after deployment runs successfully you will see an HTTPS Link returned in your console

How to Deploy Shopify App on AWS Amplify
That’s the API Gateway endpoint linked to ECS Cluster, you will insert it in your Shopify app URLs section, but first, you need to add that URL in your “.Dockerfile” ENV as a value of key called “HOST” like below
and run re-push again.

Finally, implement the URL returned by Amplify and set it as Shopify app URLs

If you enjoyed this, you might also enjoy these post

How to Deploy Node.js Shopify Apps to Digital Ocean

Previous Article

Add Custom Font To Your Shopify Store (Step by Step)

Next Article

How Can I Add a MailChimp Popup to Shopify Account?

Write a Comment

Leave a Comment

Subscribe to our Newsletter

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨