I currently have a regular/non-organization AWS account and I create EC2 instances via Boto3 using code like this:
ec2 = boto3.resource('ec2', region_name = region)
instances = ec2.create_instances(...)
I may need to change my account to an organization and create sub-accounts so I can bill accounts to multiple credit cards.
However, looking at the reference page for create_instances()
:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/service-resource/create_instances.html
I don’t see an argument which refers to a sub account.
How do you create an instance for a specific sub account, using Boto3?