aws / copilot-cli

The AWS Copilot CLI is a tool for developers to build, release and operate production ready containerized applications on AWS App Runner or Amazon ECS on AWS Fargate.
https://aws.github.io/copilot-cli/
Apache License 2.0
3.5k stars 407 forks source link

Disable service discovery or service connect in an environment #4537

Open Lou1415926 opened 1 year ago

Lou1415926 commented 1 year ago

Today, Copilot assumes that either service discovery or service connect is enabled. With this assumption, it always create an env.app.local hosted zone (by creating ServiceDiscoveryNamespace) for each environment.

Some users use the internal ALB for internal communication, and do not need service discovery or service connect at all. This behavior is not ideal for these users, because route53 hosted zone is not free to use.

We should make it possible to skip this hosted zone if it's not needed. Here is an idea:

In the service manifest, we can add a field so that user can disable both sd/sc:

network:
  connect: disabled
  discovery: disabled

The environment should be able to detect whether sd/sc is needed at all. It will create the env.app.local hosted zone only if at least ons service in the environment has one of sc or sd is enabled.

Related: https://app.gitter.im/#/room/#aws_copilot-cli:gitter.im/$U16KTFrNbv4PWrPULlM32unz5UWWAnrXVOlycD5B5Ns

roslovets commented 6 months ago

I vote for this feature because currently AWS Copilot is useless for my scenario where I build interval services inside private VPC. I find it frustrating because Copilot is promoted on the ECS page and I already invested time exploring this fancy tool.

Unfortunately it turned out that I have to patch the output template every time that makes the deployment process complicated and unpredictable between Copilot versions. In this case old good CDK looks more reliable.

I just hope that the needs of enterprise customers who might be primarily interested in private services building will be treated. Because frankly it looks like Copilot is a shiny toy for startups and enthusiasts who just want to make something quickly with limited consideration of security aspects.