Hi guys, getting this error `fatal error: An error...
# ask-metaflow
f
Hi guys, getting this error
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
while using
@batch
decorator. And while running the workflow am using
--with batch
and defining iam roles and resources that needed. My question is if we use
@batch
does it override
--with batch
arguments? And if so.. should one use
@resources
than
@batch
?
āœ… 1
v
do you see jobs submitted to Batch? If the error occurs in tasks running in Batch, it indicates that your Batch jobs don't have the right role attached to them
here's why to use
@resources
instead of `@batch`: • it allows you to run code locally,
@batch
will send the step always to Batch (which may be desirable in some cases but usually local testable is a good idea) • it allows you to change the backend in the feature. With
@resources
, you can switch between
run --with kubernetes
and
run --with batch
without changing anything in the code
f
One more thing, if we are defining parameters like this
Copy code
python3 sampleflow.py run --with batch:cpu=1,memory=4000,image=ubuntu:latest,iam_role=arn:aws:iam::something:something
if will run all the code using batch with the specified iam role but if I am using
@batch
for a step.
@batch
will get the priority rather than cli arguments right?
v
yep
f
cool thanks.
šŸ‘ 1