amazon-web-servicesamazon-ec2boto3

Use boto to create EC2 instances to be billed to a different credit card


I'd like to separate how EC2 instances are billed on my account. I will be adding a different credit card to pay for certain instances.

However, I create my EC2 instances using Boto and I cannot see any parameters in create_instances() which would identify the EC2 instance is to be part of a different billing group:

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/service-resource/create_instances.html

For example, I cannot see a sub-account parameter, I cannot see cost category parameter.

Is there a way to use Boto to create EC2 instances and they are billed to a different credit card?


Solution

  • You have fundamental confusion how billing works in AWS. Your account is billed to a single payment method. You can't have some instances on one credit card, some S3 buckets on another, and some RDS instances on the third.

    If you want to have multiple billing methods, you need to create multiple accounts; probably combined into organizations.

    You mention billing group - it is for marketplace vendors and chargeback partners. Does this apply to you? If it does - then you should have corresponding support plan and you should ask AWS for help directly.