Hey all, I'm having this error when following the...
# ask-metaflow
m
Hey all, I'm having this error when following the docs (https://docs.metaflow.org/production/scheduling-metaflow-flows/scheduling-with-aws-step-functions#pushing-a-flow-to-production):
Copy code
Invalid type for parameter containerProperties.jobRoleArn, value: None, type: <class 'NoneType'>, valid types: <class 'str'>
What could possible be the cause?
āœ… 1
a
what version of boto3 are you on?
m
Copy code
boto3==1.27.0
botocore==1.30.0
metaflow==2.9.7
a
can you try upgrading to the newer version of boto3?
šŸ‘ 1
also, were you able to run a workload on AWS Batch through
python flow.py run --with batch
?
m
same error for both solutions you proposed šŸ™
šŸ‘€ 1
b
I think we're missing a validation on the client side when submitting jobs that would check that an IAM role is provided. @many-kangaroo-56801 can you confirm if you have configured a
METAFLOW_ECS_S3_ACCESS_IAM_ROLE
in your metaflowconfig? This is the default value that is used as the IAM role that the batch job executes with. I was at least able to reproduce your error by removing this variable from my config so hoping its the culprit šŸ™‚
m
i have these variables set: • METAFLOW_BATCH_CONTAINER_IMAGE • METAFLOW_BATCH_CONTAINER_REGISTRY • METAFLOW_BATCH_JOB_QUEUE • METAFLOW_DATASTORE_SYSROOT_S3 • METAFLOW_DATATOOLS_SYSROOT_S3 • METAFLOW_DEFAULT_DATASTORE • METAFLOW_SFN_IAM_ROLE • METAFLOW_EVENTS_SFN_ACCESS_IAM_ROLE so i dont have the var you mention could you point me to the terraform file or any other resource that details the necessary permissions for that role?
b
https://github.com/outerbounds/metaflow-tools/tree/master/aws this should contain the required permissions for the role more specifically https://github.com/outerbounds/metaflow-tools/blob/master/aws/terraform/metaflow/iam-custom-role.tf#L98 look like the required permissions for batch.
@many-kangaroo-56801 did adding the role resolve the issue, or does it still persist?
m
hey sorry, havent had the time to look further into this, but ill ping here as soon as i do šŸ™‚
šŸ‘Œ 1
b
no worries, just following up šŸ™‚ hope it resolves the issue
m
it worked! thanks šŸ™‚