ent.

>>> s3_client.head_bucket(Bucket="zenfiles"){'ResponseMetadata': {'RequestId': '62YRYW5XJ1VYPCJ0', 'HostId': 'YNBXcGUMSOh90AsTgPW6/Ra89mqzfN/arQq/FMcJzYCK98cFx53+9LLfAKzZaLhwaiJTm+s3mnU=', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amz-id-2': 'YNBXcGUMSOh90AsTgPW6/Ra89mqzfN/arQq/FMcJzYCK98cFx53+9LLfAKzZaLhwaiJTm+s3mnU=', 'x-amz-request-id': '62YRYW5XJ1VYPCJ0', 'date': 'Fri, 16 Jun 2023 11:04:20 GMT', 'x-amz-bucket-region': 'us-east-1', 'x-amz-access-point-alias': 'false', 'content-type': 'application/xml', 'server': 'AmazonS3'}, 'RetryAttempts': 0}}

>>>

>>> # Try to access another S3 bucket that the original AWS long-lived credentials can access.

>>> # An error will be thrown indicating that the bucket is not accessible.

>>> s3_client.head_bucket(Bucket="zenml-demos")

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮

│ <stdin>:1 in <module>                                                                            │

│                                                                                                  │

│ /home/stefan/aspyre/src/zenml/.venv/lib/python3.8/site-packages/botocore/client.py:508 in        │

│ _api_call                                                                                        │

│                                                                                                  │

│    505 │   │   │   │   │   f"{py_operation_name}() only accepts keyword arguments."              │

│    506 │   │   │   │   )                                                                         │

│    507 │   │   │   # The "self" in this scope is referring to the BaseClient.                    │

│ ❱  508 │   │   │   return self._make_api_call(operation_name, kwargs)                            │

│    509 │   │                                                                                     │

│    510 │   │   _api_call.__name__ = str(py_operation_name)                                       │