ministryofjustice / modernisation-platform

A place for the core work of the Modernisation Platform • This repository is defined and managed in Terraform
https://user-guide.modernisation-platform.service.justice.gov.uk
MIT License
680 stars 289 forks source link

Investigate Making AWS Cloud Map (service discovery) available to Members #8459

Open richgreen-moj opened 2 weeks ago

richgreen-moj commented 2 weeks ago

User Story

As a MP Member I want to use AWS Cloud Map for Amazon ECS service discovery So that I have better service discovery for my cloud resources.

Value / Purpose

A couple of members have requested to use AWS Cloud Map for for Amazon ECS service discovery (see slack channels below). This ticket would be to look into what would need to be done to enable the use of this feature and if it's a quick/easy-win then implement it, or if not, write a follow-on ticket to enable it if it requires a lot of work.

If we rule this out again we should update the ADR to explain why it is not practical to provide the service.

Context / Background

This has previously been requested/considered here: https://mojdt.slack.com/archives/C01A7QK5VM1/p1679316872741289 and here: https://mojdt.slack.com/archives/C01A7QK5VM1/p1731059254624469

Useful Contacts

No response

Additional Information

No response

Definition of Done

markgov commented 9 hours ago

looked into cloud map and found there are two ways for the setup the first way is api only and the other way is api/dns the first one does not require a private dns entry while the second one does not and Auto-discovery is typically more challenging in API mode compared to DNS mode. In API mode, Cloud Map requires explicit service registration and doesn't automatically detect resources. You would need to:

Manually register instances Use AWS SDK or API calls to register services Explicitly manage service discovery through API calls

Automatic discovery is most native in DNS and private DNS namespace modes, which integrate more seamlessly with AWS services like ECS and EKS.