CreateNetworkIntefacePermission's purpose?

,

When looking through the reference guide, I noticed an interesting action in EC2 called CreateNetworkIntefacePermission. According to the docs, it “grants an AWS-authorized account permission to attach the specified network interface to an instance in their account.”

What purpose does this serve? I thought an interface can only be attached to an instance in the same VPC, so how would this work? Has anyone seen any practical (ab)uses of this?


Related discussions:

You can attach multiple network adapters to an instance. Most common usecase is a network appliance, some kind of firewall - perhaps packet inspection.

I’ve also seen management networks with less restrictions on traffic for the management interface. While they are in the same VPC, you can have your own management subnet that allows ssh/rdp to the instance, and network access control lists to disallow it in the other subnets where the actual app traffic is.

Finally ECS has a networking mode (awsvpc) where containers bind directly to the network adapter, bypassing the docker internal network. Here you need a network adapter per listening container

Thank you to /u/diskis and /u/distilledfluid for both taking a stab at my question. However, I don’t think either truly answer the question.

In the case of Lambda, ECS, and ASG, these actions occur with service roles so I wouldn’t need to grant access to another AWS account. In the case of multiple interfaces on a single interface, since this would happen in the same VPC (and thus the same account), this permission would not be needed either. Right?

This action is granting the permission to let an instance in another account attach to that interface. That’s the part the confuses me. Since an instance can’t span multiple VPCs (AFAIK), then this would assume another account can somehow see a VPC in another account. Is this even possible? Even with VPC peering, I didn’t think you could put resources on the other accounts VPC. However, if I could that would be great. It would reduce cross-VPC transfer costs in some cases.

I think the feature is only currently used for their fancy VMWare Cloud integration, so basically nothing most of us have ever encountered.

They do regularly drop ENIs from other accounts into our accounts and have had the underlying functionality for ages (ELBs, RDS instances, etc. all use it) but they don’t need special permission for it when it’s used by AWS services.

VMware makes a lot of sense. Thanks.

Hi. I have actually contacted Aws about this feature as it would’ve solved one of my problems. The limitation is that only accounts of authorised Aws partners are allowed to create/give this permission to other accounts. Disappointing…

Those all use service-linked roles, not this