Commit 499df8c
committed
fix(operator): use Cloud Map SRV + service-ARN integration (fixes live 503/BadRequest)
Live E2E against a real account revealed the documented Option-1 wiring
does not work: an HTTP API VPC_LINK integration rejects a raw
'http://<dns>:<port>' URI with
BadRequestException: For VpcLink VPC_LINK, integration uri should be a
valid ELB listener ARN or a valid Cloud Map service ARN.
Correct wiring (matches CDK's HttpServiceDiscoveryIntegration):
- Cloud Map service uses an SRV record (not A) so the container port is
captured; ECS registers the task IP + port into it.
- ECS service registry sets containerName/containerPort and the task def
exposes the container port, so ECS writes the SRV record.
- API Gateway integration URI is the Cloud Map *service ARN* with
connectionType=VPC_LINK and integrationMethod=ANY; the port is resolved
from SRV.
Verified end-to-end (POST through API Gateway → VPC Link → Cloud Map SRV
→ Fargate task returned HTTP 200 with the request echoed at
/prod/webhook/telegram), then torn down cleanly.
build + clippy -D warnings + cargo test (11 passed).1 parent 67d80a8 commit 499df8c
3 files changed
Lines changed: 41 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
192 | 204 | | |
193 | 205 | | |
194 | 206 | | |
| |||
294 | 306 | | |
295 | 307 | | |
296 | 308 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
302 | 319 | | |
303 | 320 | | |
304 | 321 | | |
| |||
329 | 346 | | |
330 | 347 | | |
331 | 348 | | |
332 | | - | |
| 349 | + | |
333 | 350 | | |
334 | 351 | | |
335 | 352 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | | - | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 65 | + | |
70 | 66 | | |
71 | 67 | | |
72 | 68 | | |
| |||
78 | 74 | | |
79 | 75 | | |
80 | 76 | | |
81 | | - | |
| 77 | + | |
82 | 78 | | |
83 | 79 | | |
84 | 80 | | |
| |||
93 | 89 | | |
94 | 90 | | |
95 | 91 | | |
96 | | - | |
97 | | - | |
98 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
99 | 96 | | |
100 | 97 | | |
101 | 98 | | |
| |||
108 | 105 | | |
109 | 106 | | |
110 | 107 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | 108 | | |
117 | 109 | | |
118 | 110 | | |
| |||
258 | 250 | | |
259 | 251 | | |
260 | 252 | | |
261 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
262 | 257 | | |
263 | | - | |
| 258 | + | |
264 | 259 | | |
265 | 260 | | |
266 | 261 | | |
| |||
532 | 527 | | |
533 | 528 | | |
534 | 529 | | |
535 | | - | |
| 530 | + | |
536 | 531 | | |
537 | 532 | | |
538 | 533 | | |
| |||
617 | 612 | | |
618 | 613 | | |
619 | 614 | | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | 615 | | |
633 | 616 | | |
634 | 617 | | |
| |||
0 commit comments