My client has a root account with sub accounts as environments (dev, test, production). The idea is that a ci_user within the root account assumes a role in each of these and performs deployment from CodeBuild / CodePipeline. They're using serverless
to automate the creation of Lambas.
Ideally they want the following:
- The ci_user exists in the root account
- The ci_user assumes a role in either the dev, test or production accounts
- Resources / CloudFormation is executed in those sub accounts, from the root account
Is it possible to assume such role? Or do IAM accounts need creating in those sub accounts for this to work? i.e. use those IAM accounts within sub accounts to perform deployments, and thus, run CodeBuild / CodePipeline deployments from each sub account.