def get_account_id_from_arn(trail_arn):
    return trail_arn.split(':')[4]
Gets the account ID portion of an ARN
dataset/ETHPy150Open aws/aws-cli/awscli/customizations/cloudtrail/utils.py/get_account_id_from_arn