By using AWS re:Post, you agree to the Terms of Use

EC2 - Windows 2019 with containers: call service on host

0

I'm using the "Windows 2019 with containers" AMI on an EC2 instance. This allows me to deploy Windows based Docker containers (not Docker Linux-based containers). The networking variant that's configured out of the box is 'nat'. I haven't succeeded in setting up another networking type.

The reason to deploy on EC2 is that we'd like to mix (newer) Windows container based services with legacy native services on a single host.

However, if I deploy a web-service on the host outside of the container, then I can't call that from the container using the IP address of the host. I haven't been able to determine if there's an alternate address that would work.

Outside of AWS (EC2), this is supported by Windows 2019, but the network setup in AWS and of course the virtualization appears to put some constraints on what's possible.

Calling the web-service from outside the container, direcly on the host, works.
A container on this host can post a request to a webservice outside of the host.
A container on this host can post a request to a webservice in another container on the host (apparantly the port mapping works). The address I'm using is then simply the IP address of the host.

I there a way to call, from a windows-container on Windows 2019 on EC2, a service on the same host?

asked 3 years ago34 views
2 Answers
0

What is also possible is to route the traffic from the container, via an Elastic IP adres back to a service on the host (with the appropriate access and firewall settings).

answered 3 years ago
0

I've setup a new system, with new VPC configuration and was able to call services on the host from inside the container.
I'm not sure that my original observation was correct. It is possible that there as a problem in either:

  • my first VPC configuration.
  • the configuration of the Windows firewall on the host. I've added rules to accept incoming traffic to the services on specific ports.
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions