goalie.is_existing_aws_s3_uri¶
- goalie.is_existing_aws_s3_uri(x: object) bool¶
Check whether an AWS S3 URI exists (object is accessible).
Requires
boto3(optional) or falls back to the AWS CLI (aws s3api head-object).- Parameters:
x (object) – S3 URI to check (e.g.
s3://bucket/key).- Returns:
Trueif the object exists and is accessible.- Return type:
- Raises:
RuntimeError – If neither
boto3nor theawsCLI is available, so the existence of the object cannot be determined.
Examples
>>> is_existing_aws_s3_uri("not-an-s3-uri") False