awswrangler.sts.get_account_id

awswrangler.sts.get_account_id(boto3_session: Optional[boto3.session.Session] = None)str

Get Account ID.

Parameters

boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 session will be used if boto3_session receive None.

Returns

Account ID.

Return type

str

Examples

>>> import awswrangler as wr
>>> account_id = wr.sts.get_account_id()