What is AWS cross-account access?

What is AWS cross-account access?

You can now sign in to the console as an IAM user or via federated Single Sign-On and then switch the console to manage another account without having to enter (or remember) another user name and password. This feature is built around IAM roles.

What is cross-account IAM roles?

A Cross-account IAM Role is used to define access to resources in a single account, but it isn’t restricted to users in a single account. For example: The EC2 servers in your staging environment can safely get access to an S3 bucket in production by using a properly defined role to do so.

Which of the following is the correct way to connect two VPCs in different accounts?

To request a VPC peering connection with a VPC in another account in the same region

  1. Open the Amazon VPC console for the account initiating the peering request.
  2. In the navigation pane, choose Peering Connections -> Create Peering Connection:

How do you assume Cross account IAM role?

Navigate to IAM > Roles and click on Create New Role. Select Another AWS account, and provide Account ID, and click on Next:Permissions. Enter the AWS account ID of the AWS account which can assume this role.

How to grant EC2 access to another account?

Follow these steps to grant permissions for an Amazon EC2 instance in Account A to access a bucket in another account (Account B). 1. Sign in to the AWS Management Console with Account B. 2. Open the AWS Identity and Access Management (IAM) console. 3.

How to create a cross account in EC2?

Execute sts:AssumeRole to assume the cross-account role for Account A, to obtain temporary credentials. Use those temporary credentials to execute the rest of your API methods. In account B, I created a role (e.g AssumeRoleInA) and attach a policy to allow it to assume the role that is created in account A.

How to create an EC2 instance in account B?

In account B, create a new EC2 instance (if it does not exists yet), and associate it’s ec2-profile with the IAM role named AssumeRoleInA.

How to grant EC2 instance access to an S3 bucket?

Note: The steps for granting instance access to an Amazon S3 bucket are similar to granting access to other AWS resources in another account. Follow these steps to grant permissions for an Amazon EC2 instance in Account A to access a bucket in another account (Account B). 1. Sign in to the AWS Management Console with Account B. 2.