databricks_aws_utils.session

A helper to help getting a Boto3 session

get_session

def get_session(region: str = "us-east-1", profile: Optional[str] = None, role: Optional[str] = None, context: Optional[str] = None) -> Session

AWS Boto3 session creator

Arguments:

  • region str - the AWS Region, default us-east-1
  • profile str, optional - the AWS Profile to be used
  • role str, optional - the AWS Role to be assumed (Required if profile is not defined)
  • context str, optional - the Role Session Name to be used when assuming role \ (Required if profile is not defined)

Returns:

Session boto3 session object