s3.configured_endpoint_url()
Return the S3 endpoint the AWS configuration sets for a profile, if any.
Usage
s3.configured_endpoint_url(profile=None)The lookup botocore performs when a client is created without an explicit endpoint: AWS_ENDPOINT_URL_S3, then AWS_ENDPOINT_URL, then the services section and the endpoint_url key of the profile in the shared config file, all of them ignored when AWS_IGNORE_CONFIGURED_ENDPOINT_URLS or the profile’s ignore_configured_endpoint_urls says so.
Reading the configuration files is not free, and s3_env() runs once per raster opened, so the result is cached per profile alongside aws_session(). Call clear_aws_session_cache() after changing the configuration files or the endpoint variables during a process.
Parameters
profile: str = None-
Named AWS profile.
Nonereads the default profile.
Returns
str or None-
The configured endpoint, or
Nonewhen nothing sets one or the profile does not exist.