Conversation
| try: | ||
| s3 = get_s3_client() | ||
| objects = s3.list_objects_v2(Bucket=bucket_name)["Contents"] | ||
| objects = s3.list_objects(Bucket=bucket_name)["Contents"] |
There was a problem hiding this comment.
Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.
This code uses an outdated API. list_objects_v2 is the revised List Objects API, and we recommend you use this revised API for new application developments.
| try: | ||
| s3 = get_s3_client() | ||
| objects = s3.list_objects_v2(Bucket=bucket_name)["Contents"] | ||
| objects = s3.list_objects(Bucket=bucket_name)["Contents"] |
There was a problem hiding this comment.
Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.
The API method list_objects returns paginated results instead of all results. Consider using the pagination API or checking one of the following keys in the response to verify that all results were returned: IsTruncated, Marker, NextMarker, NextToken.
No description provided.