This message was deleted.
# aws
This message was deleted.
When you create an ECS service and want to utilize Service Discovery via CloudMap & Route53 you first need to create your Cloudmap Namespace/Domain, then you create you service registry, which then when a task spins up it registers via the Service Discovery Service registration
ServiceDiscoveryNamespace -> ServiceDiscovery Service Registration -> Tie Service Registration to ECS Service for IP's to map to service name.
really appreciate the help. any idea how I can then pipe the resulting service discovery hostname into another pulumi component? I’m attempting to pass the hostname created by the service discovery service in as an env variable to a different ECS service
Copy code
let myAppServiceRegistryService = new aws.servicediscovery.Service("myApp", {
    dnsConfig: {
        dnsRecords: [{
            ttl: 10,
            type: "A"
        routingPolicy: "MULTIVALUE"

let myAppFargateService = new awsx.ecs.FargateService("myApp", {
    serviceRegistries: {
        registryArn: myServiceRegistry.arn,
        containerName: myAppServiceRegistryService

new awsx.ecs.FargateService("myOtherService", {
    taskDefinitionArgs: {
        containers: {
            [`${serviceName}`]: {
                environment: [{
                    name: "APP_HOSTNAME",
                    value: aws.servicediscovery.Service.get(,
what I’m trying to looks more or less like this ☝️
I that's prolly how I would do it first round. Not sure if you need to wrap that in an
or not, that you may have to mess with on the the
pulumi preview