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]:
124124 >>> from awswrangler._utils import parse_path
125125 >>> bucket, key = parse_path('s3://bucket/key')
126126
127+ >>> from awswrangler._utils import parse_path
128+ >>> bucket, key = parse_path('s3://arn:aws:s3:<awsregion>:<awsaccount>:accesspoint/<ap_name>/<key>')
127129 """
128130 if path .startswith ("s3://" ) is False :
129131 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 )
131133 bucket : str = parts [0 ]
132134 if "/" in bucket :
133135 raise exceptions .InvalidArgumentValue (f"'{ bucket } ' is not a valid bucket name." )
You can’t perform that action at this time.
0 commit comments