AWS cross account propagation

We’re managing a few customers’ account.
If we create cross account + assume role.
is there anyway we can propagate the role permission across all the managed account?

For example,

  • account A (main account)
  • account B (sub account)
  • account C (sub account)

If we want to amend a user’s permission with new policy, remove terminate instance access. Is there any way we can do it in account A and have that policy propagate to account B and C?


Related discussions:

Not right now. You currently have to create policies for each destination AWS account. That may change when Organizations is released - that is said to allow policies to be inherited, accounts to be grouped etc. No eta for release.

Organizations is still in preview and from what I heard this feature hasn’t been introduced yet but it will be available later on.

On Account A:

  • Lambda Function that sets up cross account access to S3 bucket containing policies

On Account B:

  • Lambda Function that consumes policies from S3 buckets and sets up Roles/Policies

Getting the lambda function in place requires local execution with credentials for Account B/C.

We use IAMy to codify all our policies, roles and users (and s3 bucket policies) across several accounts. Then to replicate them is as simple as copying a YAML file and running iamy push

oh, thanks for the info, will go and test on it :smiley:

Thanks, but Lambda is still quite new to me, still figuring it out. This seems like the most feasible way to automate the problem. Once it’s up and running, the only maintenance would be doing the policy update.

Lambda is really awesome and I always recommend using it for things like this. The maintenance also becomes really low once the roles are setup since you can trigger it from Account A pretty easily (store all accounts in a dynamodb table and have a function use that to push out updates).