We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79a1954 commit c8a5605Copy full SHA for c8a5605
python/example_code/s3/scenarios/batch/s3_batch_scenario.py
@@ -176,6 +176,12 @@ def run_scenario(self) -> None:
176
177
except Exception as e:
178
print(f"An error occurred: {e}")
179
+ print("\nCleaning up resources due to failure...")
180
+ try:
181
+ self.s3_batch_wrapper.cleanup_resources(bucket_name, file_names)
182
+ self.cfn_helper.destroy_cloudformation_stack(self.STACK_NAME)
183
+ except Exception as cleanup_error:
184
+ print(f"Error during cleanup: {cleanup_error}")
185
raise
186
187
print("\nThe Amazon S3 Batch scenario has successfully completed.")
0 commit comments