AWS: How to assign an Elastic IP to an individual container

Relates to this post, as well https://discuss.linuxcontainers.org/t/aws-best-way-to-give-container-its-own-ip-from-attached-eni-nic

Also, this very recent Youtube video has given me some additional ideas Accessing services running in LXD instances - YouTube

AWS allows setting routes at the VPC and subnet level. So what I really want to try is routing to an entire container subnet via an ENI/virtual NIC attached in the manner Marcus mentions above.

Based on the Youtube video, this seems to be possible if the attached NIC is created as an LXD network with a dedicated network bridge as the parent. This scheme might also work well for LXD clusters with Fan Overlay networking.

Setting up routes in AWS is not difficult, but it is definitely something you would want to automate with the aws CLI or terraform or similar, since there are several steps involved.