<#4470 [BUG] Access denied when file not found> Is...
# flytekit
a
#4470 [BUG] Access denied when file not found Issue created by pingsutw Describe the bug If the workflow tar file is removed, flytekit will not be able to download the workflow code. Instead of raising an access denied error, flytekit should raise a file not found error
Copy code
kages/flytekit/bin/entrypoint.py:519 in    │
│ fast_execute_task_cmd                                                        │
│                                                                              │
│ ❱ 519 │   │   _download_distribution(additional_distribution, dest_dir)      │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/flytekit/core/utils.py:295 in        │
│ wrapper                                                                      │
│                                                                              │
│ ❱ 295 │   │   │   │   return func(*args, **kwargs)                           │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/flytekit/tools/fast_registration.py: │
│ 113 in download_distribution                                                 │
│                                                                              │
│ ❱ 113 │   FlyteContextManager.current_context().file_access.get_data(additio │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/flytekit/core/data_persistence.py:47 │
│ 5 in get_data                                                                │
│                                                                              │
│ ❱ 475 │   │   │   raise FlyteAssertion(                                      │
╰──────────────────────────────────────────────────────────────────────────────╯
FlyteAssertion: Failed to get data from 
s3://<my-bucket-here>/flytesnacks/development/RUD7F4QDHIZRCQGDFXZKERK4GM======/scr
ipt_mode.tar.gz to /root/ (recursive=False).

Original exception: Access Denied
Expected behavior flytekit should raise a file not found error Additional context to reproduce 1. pyflyte run --remote workflow.py wf 2. remove script_mode.tar.gz from s3 bucket 3. pyflyte run --remote workflow.py wf # run the workflow again Screenshots image Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte