{"id":24017462,"url":"https://github.com/mattyboy84/aws-ecs-web-app-demo","last_synced_at":"2026-04-10T12:33:33.993Z","repository":{"id":176796946,"uuid":"586229420","full_name":"mattyboy84/AWS-ECS-web-app-demo","owner":"mattyboy84","description":"An AWS ECS demo for deploying react-nextjs apps onto fleets of ECS containers. Includs a seperate ECS backend \u0026 nextjs frontend.","archived":false,"fork":false,"pushed_at":"2023-07-08T08:17:08.000Z","size":266,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T20:32:32.980Z","etag":null,"topics":["amplify","aws","docker","ecs","javascript","networking","nextjs","portfolio","react","website"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattyboy84.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-07T12:02:45.000Z","updated_at":"2023-12-04T18:09:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"324b2328-1ca8-4cfc-b8f7-480ad5114f37","html_url":"https://github.com/mattyboy84/AWS-ECS-web-app-demo","commit_stats":null,"previous_names":["mattyboy84/aws-ecs-web-app-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mattyboy84/AWS-ECS-web-app-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattyboy84%2FAWS-ECS-web-app-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattyboy84%2FAWS-ECS-web-app-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattyboy84%2FAWS-ECS-web-app-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattyboy84%2FAWS-ECS-web-app-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattyboy84","download_url":"https://codeload.github.com/mattyboy84/AWS-ECS-web-app-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattyboy84%2FAWS-ECS-web-app-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31643039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amplify","aws","docker","ecs","javascript","networking","nextjs","portfolio","react","website"],"created_at":"2025-01-08T09:18:21.944Z","updated_at":"2026-04-10T12:33:33.980Z","avatar_url":"https://github.com/mattyboy84.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](images/diagram.png)\n\n# ecs-cluster \u0026 ecs-cluster-image-repo are individual repositories / AWS stacks\n\n## ecs-cluster\necs-cluster can be deployed on its own given the `imageRepoName` parameter is updated to point to an already existing image / ECR repo  \n![](images/ecs-cluster-image-repo.png)  \n![](images/taskDef-image-repo.png)  \n\nChanging the image might need more resources to be assigned to the Task Defination  \n![](images/taskDef-resources.png)\n\n---\n\n# Setup\nfirst, deploy `ecs-cluster-image-repo` to AWS then run the `deployDockerImage` Gitlab Job to publish the react-app as a docker image to an ECR repository  \n![](images/deployDockerImage.png)  \n\nThis job will also run the `scripts/envs.sh` bash script that appends `NEXT_PUBLIC_` to all AWS stack outputs, saves them all to a .env file and compiles it into the docker image for dynamic use of variables inside the image instead of hardcoding values.  \n\nThe docker image also exposes port 8081 which the `ecs-cluster` directs web traffic to.  \n\nsecondly, deploy `ecs-cluster` to AWS. The deployment will automatically create an ECS service with a running task. This task can be accessed via the load balancer DNS name that is exported as an output of the `ecs-cluster` stack. e.g. `http://ecs-cluster-lb-12345678.eu-west-2.elb.amazonaws.com/`  \n\nThe `ecs-cluster` gitlab jobs can also be used to administrate ECS  \n![](images/ecs-cluster-tasks.png)\n\n`restartAllTasks` - gets the number of tasks running e.g. 3 then launches 3 more while shutting down the previous 3. This process will refresh the image in the task if the image has been updated.  \n\n`stopAllTasks` - stops all tasks to save costs  \n\n`startOneTask` - starts 1 task  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattyboy84%2Faws-ecs-web-app-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattyboy84%2Faws-ecs-web-app-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattyboy84%2Faws-ecs-web-app-demo/lists"}