Amogh Kulkarni
06/28/2022, 6:02 PMprefect config set PREFECT_API_URL=http://<orion-dev-server>:4200/api
2. I then wrote the code of the flow and deployment spec on my local machine.
Code of the deployment spec:
DeploymentSpec(
flow_location="<flow location>",
flow_name="flow_one",
name="deployment-one",
flow_runner=KubernetesFlowRunner(
image="<image is on AWS ECR>",
namespace="<kubernetes namespace>",
image_pull_policy="Always"
)
)
I then run the deployment by prefect deployment create <deployment python file>
This runs fine. The file gets copied to S3 storage and I can see the deployment and flow on the orion server.Kevin Kho
06/28/2022, 9:44 PMZanie
06/28/2022, 9:48 PMcreate
operation, but are they available in the flow run image?Amogh Kulkarni
06/28/2022, 10:21 PMFlow could not be retrieved from deployment.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/prefect/engine.py", line 212, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_deployment(deployment, client=client)
File "/usr/local/lib/python3.8/site-packages/prefect/client.py", line 105, in with_injected_client
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/prefect/deployments.py", line 540, in load_flow_from_deployment
maybe_flow = await client.resolve_datadoc(deployment.flow_data)
File "/usr/local/lib/python3.8/site-packages/prefect/client.py", line 1916, in resolve_datadoc
return await resolve_inner(datadoc)
File "/usr/local/lib/python3.8/site-packages/prefect/client.py", line 1909, in resolve_inner
data = await self.retrieve_data(data)
File "/usr/local/lib/python3.8/site-packages/prefect/client.py", line 1477, in retrieve_data
return await storage_block.read(embedded_datadoc)
File "/usr/local/lib/python3.8/site-packages/prefect/blocks/storage.py", line 194, in read
return await run_sync_in_worker_thread(self._read_sync, key)
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/asyncio.py", line 53, in run_sync_in_worker_thread
return await anyio.to_thread.run_sync(call, cancellable=True)
File "/usr/local/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.8/site-packages/prefect/blocks/storage.py", line 204, in _read_sync
s3_client.download_fileobj(Bucket=self.bucket, Key=key, Fileobj=stream)
File "/usr/local/lib/python3.8/site-packages/boto3/s3/inject.py", line 795, in download_fileobj
return future.result()
File "/usr/local/lib/python3.8/site-packages/s3transfer/futures.py", line 103, in result
return self._coordinator.result()
File "/usr/local/lib/python3.8/site-packages/s3transfer/futures.py", line 266, in result
raise self._exception
File "/usr/local/lib/python3.8/site-packages/s3transfer/tasks.py", line 269, in _main
self._submit(transfer_future=transfer_future, **kwargs)
File "/usr/local/lib/python3.8/site-packages/s3transfer/download.py", line 354, in _submit
response = client.head_object(
File "/usr/local/lib/python3.8/site-packages/botocore/client.py", line 508, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.8/site-packages/botocore/client.py", line 915, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
```
Zanie
06/28/2022, 10:25 PM*
at the end of your bucket ACL?Amogh Kulkarni
06/28/2022, 10:26 PMAnna Geller
06/30/2022, 12:26 PM