Deploying Containers on AWS
  • 26 Jul 2022
  • 1 Minute to read
  • Dark
    Light

Deploying Containers on AWS

  • Dark
    Light

Two or more containers cannot be started at the same time.
For containers running on a new database, start only one first so it may set up the database, After that, start other containers one at a time.

Overview

This article will cover the steps needed to deploy a container onto an AWS(Amazon Web Service) environment. Containers will be created using Amazon ECS

To deploy in an AWS environment, an AWS account must be created.


Deploying container in AWS

  1. Login to AWS portal. In the search menu, search for ECS.
  2.  Select Create Cluster.
  3.  Create a cluster with the appropriate template, in this case we will use EC2 Linux + Networking.
  4. Configure the cluster, for more information on recommended system settings, we can refer to AWS's section in the Installation Guide.
  5. Once the cluster has been configured, navigate to create task.
  6.  Create a new Task Definition and select the appropriate launch types for the instance.
  7.  Under the volumes header, add a volume for the file storage.
  8. Under Container definitions, select Add container.
  9.  Specify the container name, and Image. The image can be found on the following Docker repo for Decisions. For the image, it is recommended to use decisionscore/platform:latest to use the latest image for the container.
  10. Specify a hard limit for the container.
  11. Under port mapping, map port 80 of the host to port 80 of the container.
  12. Under the Environment variables section, define both the required and any optional environment variables to configure the container.
  13. Once the container environment variables have been configured, specify the mount point to be the volume that was created earlier. Map the volume to the \filestorage path of the container.
  14. Once finished, save and navigate back to the Cluster. Select Run new Task using the created task definition.

Was this article helpful?