When creating a new account, you can optionally specify if the account's IAM users should have access to the account's billing information and what is the name of the IAM role AWS Organizations creates in the account. You can use accountCreation property specify the default values for these options in the organization configuration file:
organization.yml
# This is how you set the defaults for account creation.accountCreation:defaults:iamUserAccessToBilling:trueroleName:MyAccountAdminRolemasterAccountId:"098765432100"organizationAdminRoleName:MyOrganizationAdminRoleserviceControlPolicies:restrict-by-regions:description:Restrict regionsFullAWSAccess:description:AWS managed default policyawsManaged:truebackupPolicies:MyBackups:description:Backup policyorganizationalUnits:Root:serviceControlPolicies:FullAWSAccessaccounts: - "098765432100"Root/Workloads:serviceControlPolicies:restrict-by-regionsRoot/Workloads/Dev: {}Root/Workloads/Test: {}Root/Workloads/Prod:accounts: - id:"876754648373"name:MyAccountemail:account@example.comdescription:This is a production accountRoot/Sandbox:accounts: - id:"123456789012"backupPolicies: - MyBackups - "448873940474"
Account contraints
You can set accepted pattern for account name and email by providing constraints property under account creation configuration:
organization.yml
accountCreation:defaults:iamUserAccessToBilling:trueroleName:MyAccountAdminRole# This is how you set constraints for account name and email. constraints:# Account name must match this regex patternnamePattern:"^my-account-[a-z0-9-]+$"# Account email must match this regex patternemailPattern:"^admin\\+my-account-[0-9a-z-]+@example.com$"masterAccountId:"098765432100"organizationAdminRoleName:MyOrganizationAdminRoleserviceControlPolicies:restrict-by-regions:description:Restrict regionsFullAWSAccess:description:AWS managed default policyawsManaged:truebackupPolicies:MyBackups:description:Backup policyorganizationalUnits:Root:serviceControlPolicies:FullAWSAccessaccounts: - "098765432100"Root/Workloads:serviceControlPolicies:restrict-by-regionsRoot/Workloads/Dev: {}Root/Workloads/Test: {}Root/Workloads/Prod:accounts: - id:"876754648373"name:MyAccountemail:account@example.comdescription:This is a production accountRoot/Sandbox:accounts: - id:"123456789012"backupPolicies: - MyBackups - "448873940474"