HomeSoftware EngineeringHow one can Assume Function throughout Accounts in AWS

How one can Assume Function throughout Accounts in AWS


If it’s essential to assume position between AWS accounts, or enable an account to imagine a job and use sources in one other AWS account, then it’s essential to create a job and connect the next coverage.

The next two (2) steps creates a Belief Relationship between the accounts.

Step 1 – Within the Supply Account

{
  "Model": "2012-10-17",
  "Assertion": [{
    "Effect": "Allow",
    "Action": [
      "sts:AssumeRole"
    ],
    "Useful resource": [
      "arn:aws:iam::DESTINATION-ACCOUNT-ID:role/DESTINATION-ROLENAME"
    ]
  }]
}

Step 2 – Within the Vacation spot Account

{
  "Model": "2012-10-17",
  "Assertion": [{
    "Effect": "Allow",
    "Principal": {
      "AWS": "arn:aws:iam::SOURCE-ACCOUNT-ID:role/SOURCE-USERNAME"
    },
    "Action": "sts:AssumeRole"
  }]
}
RELATED ARTICLES

Most Popular

Recent Comments