diff --git a/moto/s3/responses.py b/moto/s3/responses.py index ae6662579..f1526cdc6 100644 --- a/moto/s3/responses.py +++ b/moto/s3/responses.py @@ -413,7 +413,7 @@ class ResponseObject(_TemplateEnvironmentMixin, ActionAuthenticatorMixin): if marker: result_keys = self._get_results_from_token(result_keys, marker) - result_keys, is_truncated, _ = self._truncate_result(result_keys, max_keys) + result_keys, is_truncated, next_marker = self._truncate_result(result_keys, max_keys) template = self.response_template(S3_BUCKET_GET_RESPONSE) return 200, {}, template.render( @@ -423,6 +423,7 @@ class ResponseObject(_TemplateEnvironmentMixin, ActionAuthenticatorMixin): result_keys=result_keys, result_folders=result_folders, is_truncated=is_truncated, + next_marker=next_marker, max_keys=max_keys ) @@ -1323,6 +1324,9 @@ S3_BUCKET_GET_RESPONSE = """ {{ max_keys }} {{ delimiter }} {{ is_truncated }} + {% if next_marker %} + {{ next_marker }} + {% endif %} {% for key in result_keys %} {{ key.name }}