diff --git a/prefect_aws/workers/ecs_worker.py b/prefect_aws/workers/ecs_worker.py index afbe631b..c55e0f30 100644 --- a/prefect_aws/workers/ecs_worker.py +++ b/prefect_aws/workers/ecs_worker.py @@ -242,7 +242,7 @@ def mask_sensitive_env_values( def mask_api_key(task_run_request): return mask_sensitive_env_values( - task_run_request, ["PREFECT_API_KEY"], keep_length=6 + deepcopy(task_run_request), ["PREFECT_API_KEY"], keep_length=6 )