INNER CODE UNIT · Python

client

grycap/scar · scar/providers/aws/clients/__init__.py:34

    def client(self):
        """Returns a boto client based on the 'boto_client_name' property,
        the region specified on the client args and
        the profile specified on the session args."""
        # 'default' profile if nothing set
        session = boto3.Session(**self.session_args)
        self.client_args['config'] = botocore.config.Config(read_timeout=self._READ_TIMEOUT)
        return session.client(self._BOTO_CLIENT_NAME, **self.client_args)

    def get_access_key(self) -> str:
        """Returns the access key belonging to the boto_profile used."""
        session = boto3.Session(**self.session_args)
        credentials = session.get_credentials()
        return credentials.access_key

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…