awslabs / awslabs/aws-solutions-constructs
How to safely deploy stacks using AlbToFargate into the same VPC
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 268
- Avg merge
- 5h 18m
- Merged PRs (30d)
- 5
Description
This is not necessarily a bug but it is not clear to me what the best practices are.
Because AlbToFargate (and other constructs) attaches service endpoint (e.g., ecr, ddb) into the VPC it uses, if you have multiple stacks all using AlbToFargate and share the same vpc only the first stack would succeed because of the endpoints can't be attached again.
What one would have done is to perform the service endpoint attachment in where the VPC is defined, and when importing the VPC into a stack one also places the `interfaceTag` marker into the VPC construct so the service endpoints are not attached again. This gets around the problem but it does not seem to be a general solution.
### Reproduction Steps
### Error Log
### Environment
- **CDK CLI Version :**
- **CDK Framework Version:**
- **AWS Solutions Constructs Version :**
- **OS :**
- **Language :**
### Other
---
This is :bug: Bug Report
Contributor guide
Research direction
Start by reading the AlbToFargate construct's handling of the shared VPC and service endpoints, then review the interfaceTag approach described in the issue and the existing comment thread. Done should mean that the project has either a documented, generally applicable deployment pattern or a clearly scoped change that prevents endpoint conflicts across stacks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100