goalie.is_aws_s3_uri

goalie.is_aws_s3_uri(x: object) bool

Check whether the input contains an AWS S3 URI.

Simple pattern match on the s3:// prefix; does not verify that the URI exists.

Parameters:

x (object) – Value to check.

Returns:

True if x looks like an S3 URI.

Return type:

bool

Examples

>>> is_aws_s3_uri("s3://my-bucket/key")
True
>>> is_aws_s3_uri("https://example.com/")
False