0

enter image description here

I have deployed my NodeJS Express API to AWS ECS

I created :

  • cluster
  • cluster service
  • task definition
  • ECR

If I need to deploy another API for testing/development, do I need re-create these :

  • cluster
  • cluster service
  • task definition
  • ECR

or I can just create another cluster service ?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
code-8
  • 54,650
  • 106
  • 352
  • 604

1 Answers1

1

To run a seperate application on an AWS ECS cluster as a separate service you'll need a

  1. Task Definition
  2. Service Definition
  3. Each application should have it's own ECR repository but still be in the same ECR registry.

If the cluster is too small to run all of the services tasks at the same time you can also scale the cluster

serviceName The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a >cluster, but you can have similarly named services in multiple clusters within a >region or across multiple regions.

Type: String

Required: Yes taskDefinition The family and revision (family:revision) or full ARN of the task definition to run in your service. If a revision is not specified, the latest ACTIVE revision is >used.

Type: String

Required: Yes

https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html

strongjz
  • 4,271
  • 1
  • 17
  • 27