aws / aws/aws-cdk

ECS CloudMap - ServiceConnect : after update, ECS doesn't support having both CLoudMap and ServiceConnect

Open
#26,524 2 comments 1 reaction 0 assignees View on GitHub
@aws-cdk/aws-ecs bug effort/medium p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
1d 19h
Merged PRs (30d)
74

Description

### Describe the bug

Hi, hope to find you well :)

After one of the recent updates, I am not able anymore to apply this kind of configuration
```
const qmmRedisService = new ecs.FargateService(this, `${props.STAGE}qmmRedisService`, {
serviceName: `${props.STAGE}qmmRedisService`,
cluster: qlashMainCluster,
desiredCount: 1,
securityGroups: [qmmRedisServiceSecurityGroup],
taskDefinition: qmmRedisTaskDefinition,
enableExecuteCommand: true,
vpcSubnets: { subnetGroupName: props.qmmRedisSubnetGroupName },
cloudMapOptions: {
container: qmmRedisContainer,
name: `${props.STAGE.toLowerCase()}_qmm_redis`,
containerPort: 6379
},
serviceConnectConfiguration: {
services: [{ portMappingName: `${props.STAGE.toLowerCase()}_qmm_redis` }]
}
})
```

### Expected Behavior

This used to allow me to make use of the service connect monitoring, as well as resolving the DNS in a Peered VPC

### Current Behavior

Now I can choose either a cloudmap configuration or a service connect one. With the first I have to sacrifice DNS resolution outside of the cluster, with the second I give up on extra monitoring

### Reproduction Steps

NA

### Possible Solution

Restoring this old functionality?

### Additional Information/Context

_No response_

### CDK CLI Version

2.88

### Framework Version

_No response_

### Node.js Version

v18.16

### OS

Linux - Ubuntu

### Language

Typescript

### Language Version

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the TypeScript FargateService configuration shown in the issue and inspect how cloudMapOptions and serviceConnectConfiguration are handled in CDK 2.88. Reproduce the configuration if possible, then verify that synthesis and deployment retain both external DNS resolution and Service Connect monitoring without regressing either option.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.