File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -124,10 +124,12 @@ def parse_path(path: str) -> Tuple[str, str]:
124
124
>>> from awswrangler._utils import parse_path
125
125
>>> bucket, key = parse_path('s3://bucket/key')
126
126
127
+ >>> from awswrangler._utils import parse_path
128
+ >>> bucket, key = parse_path('s3://arn:aws:s3:<awsregion>:<awsaccount>:accesspoint/<ap_name>/<key>')
127
129
"""
128
130
if path .startswith ("s3://" ) is False :
129
131
raise exceptions .InvalidArgumentValue (f"'{ path } ' is not a valid path. It MUST start with 's3://'" )
130
- parts = path .replace ("s3://" , "" ).split ("/" , 1 )
132
+ parts = path .replace ("s3://" , "" ).replace ( ":accesspoint/" , ":accesspoint:" ). split ("/" , 1 )
131
133
bucket : str = parts [0 ]
132
134
if "/" in bucket :
133
135
raise exceptions .InvalidArgumentValue (f"'{ bucket } ' is not a valid bucket name." )
You can’t perform that action at this time.
0 commit comments