Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 3.14 KB

README_aws_service_discovery.md

File metadata and controls

50 lines (36 loc) · 3.14 KB

AWS ECS Service Discovery

  • allows multiple AWS ECS services to talk to each other

  • deployment order of services matters - for the first deployment

    • subsequent deployment all services will be aware of each other
    • ex: if app service depends on db service, deploy the db service first
  • service task definitions CloudFormation

    • portName - referencing port name in task definition json file
    • discoveryName - reservation of application name
      • defaults to portName
      • can have more than one discoveryName
      • sub-parameter: dnsName - tells how client to connect to service
        • defaults to discoverName.namespace
  • in each service's task definition, there will be two containers: (1) the app you specified in task definition (2) ecs-service-connect container (sidecar container)

    • can be multiple task definition's per service if want replication
  • to communicate across namespaces, use load balancers

    • TO DO: look into how to do this

Creating the components in AWS ECS

  • can specify the Dockerfile command argument for the container when creating the task-definition
    • means can reuse base Dockerfile
  • when creating AWS service must put task in the public subnet or it can't communicate with the ECR repo

Debugging references

AWS Networking Setup

AWS Service Connect References