- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
As far as I can tell from reviewing the following documents, it appears to be possible to connect to the Internet. [1]
[1] Container services in Amazon Lightsail | Lightsail Documentation
https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-container-services#container-services-endpoints-domains
Yes, container services do have public IPs, but they're not stable. When setting up a custom domain, you'll want to point your custom domain to your container service by means of a CNAME record or an ALIAS record. Route53 and Lightsail Domains have special support for ALIAS records and some third-party DNS providers support ALIAS records as well.
Lightsail container services can connect to anything on the public internet that accepts the connection. You may want to check your connection string for typos, make sure that the resource you're trying to connect to is reachable from the public internet, and add logging to your application so that you can get more information about the issue.
No amount of logging inside a container can diagnose a socket timeout error. Something at the OS or network layer is an issue (maybe there is no route outside of the subnet?). Just to verify, I created an EC2 instance (with a public IP assigned), installed docker, and ran the same container image. Outbound connections worked with no change.
Adding an ALIAS record in my 3rd party DNS worked great for inbound traffic on the lightsail container, but at this point I have given up on it getting outbound traffic. Making things simple also means that it isn't flexible or transparent.
Contenuto pertinente
- AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata 3 anni fa
- Come posso copiare le regole dei firewall di Lightsail esistenti su istanze di Lightsail differenti?AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata 3 mesi fa
It is definitely true that they can receive inbound traffic from the internet, which is what that link describes (a public "endpoint" seems like a load balancer in front of the container(s)), but my question is about outbound traffic.