Monday, May 22, 2023
HomeSoftware EngineeringThe best way to Assume Function throughout Accounts in AWS

The best way to Assume Function throughout Accounts in AWS


If you might want to assume position between AWS accounts, or enable an account to imagine a task and use sources in one other AWS account, then you might want to create a task 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

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments