AwsAuth#
- class eodag.plugins.authentication.aws_auth.AwsAuth(provider, config)[source]#
AWS authentication plugin
The authentication method will be chosen depending on which parameters are available in the configuration:
auth using
profile_name(if credentials are given and containaws_profile)auth using
aws_access_key_id,aws_secret_access_keyand optionallyaws_session_token(if credentials are given but noaws_profile)auth using current environment - AWS environment variables and/or
~/.aws/*(if no credentials are given in config)auth anonymously using no-sign-request if no credentials are given in config and auth using current environment failed
- Parameters:
provider (
str) – provider nameconfig (
PluginConfig) –Authentication plugin configuration:
type(str) (mandatory): AwsAuthauth_error_code(int) (mandatory forcreodias_s3): which error code is returned in case of an authentication errors3_endpoint(str): s3 endpoint urlrequester_pays(bool): whether download is done from a requester-pays bucket or not; default:False
- __init__(provider, config)[source]#
- Parameters:
provider (
str)config (
PluginConfig)
Methods
__init__(provider, config)authenticate()Authenticate
authenticate_objects(bucket_names_and_prefixes)Authenticates with s3 and retrieves the available objects
get_rio_env()Get rasterio environment variables needed for data access authentication.
get_s3_client()Get S3 client from S3 resource
validate_config_credentials()Validate configured credentials
Attributes
plugins