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?

질문됨 2달 전182회 조회
1개 답변
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
전문가
답변함 2달 전
profile picture
전문가
검토됨 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠