Home > other >  How to get Contact Information and Alternate Contact in AWS/Billing using boto3?
How to get Contact Information and Alternate Contact in AWS/Billing using boto3?

Time:09-17

I am working on a project in which through the boto3 SDK I need to obtain the information from Alternate Contacts and Contact Information.

Is there a method that do this with boto3? Thanks!

CodePudding user response:

To fetch account data you can use describe_account function.

If the contact information are not in the response of describe account then i dont think is possible to fetch those info via SDK.

import boto3

client = boto3.client('organizations')

response = client.describe_account(
    AccountId='string'
)

CodePudding user response:

Yeah I've run into that problem many times before. When dealing with large scale organizations this is kindof a bottleneck sometimes. It's currently not possible to automate easily.

Some corporates I've seen get around this by tagging account's with a 'BillingContact' and 'Technical Contact's etc. and build their own logic around those tags using lambda's. This doesn't help in letting account's owners receive messages from AWS directly, but it gives some possibilities to email account owners using your own logic to have some form of governance.

  • Related