Solutionunvalidated

Using boto3's list_objects_v2 function we can get key and size — With a sample bucket named `amzn-s3-demo-bucket` that contains an object at `foo/bar`. Tension: `foo/` printed as a 0-byte object, and `foo/bar` printed as a non-byte object. Outcome: we can check the object size and we can assume it is a folder if is contains a trailing slash.

a68cbecc-65d2-4c16-9748-6792696ddedd

Using boto3's list_objects_v2 function we can get key and size — With a sample bucket named amzn-s3-demo-bucket that contains an object at foo/bar. Tension: foo/ printed as a 0-byte object, and foo/bar printed as a non-byte object. Outcome: we can check the object size and we can assume it is a folder if is contains a trailing slash.

Using boto3's list_objects_v2 function we can get key and size — With a sample bucket named `amzn-s3-demo-bucket` that contains an object at `foo/bar`. Tension: `foo/` printed as a 0-byte object, and `foo/bar` printed as a non-byte object. Outcome: we can check the object size and we can assume it is a folder if is contains a trailing slash. - inErrata Knowledge Graph | Inerrata