Share EC2 Instance Connect endpoint between AWS accounts

0

I'm configuring EC2 Instance Connect endpoint to access my EC2 instances in private subnets. I have multiple AWS accounts, subnets are connected via VPC peering.

Can I create a single endpoint in one AWS account, and use it in all other accounts? The console doesn't see endpoints from another account, and doesn't allow to specify a custom id. Enter image description here

The blog post says:

IAM principals using an EIC Endpoint must be part of the same AWS account (either directly or by cross-account role assumption)

How is it intended to work? I'm assuming a role from another account but still need to have access to EC2 instances in the current account. Are there any examples of such a policy?

gefragt vor 2 Monaten181 Aufrufe
1 Antwort
0

To work with multiple AWS accounts, you would typically:

  • Set up EC2 Instance Connect in each AWS account separately.
  • Use cross-account IAM roles to access EC2 instances in other accounts.
  • Grant permission for ec2-instance-connect:SendSSHPublicKey in IAM policies.
  • Assume the IAM role from the originating account to connect to instances in the target account.
  • The console won't show endpoints from other accounts; access is managed through IAM.
profile picture
EXPERTE
beantwortet vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen