You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Botocore will throw an error of botocore.exceptions.NoCredentialsError if too many s3 objects are requested simultaneously on an AWS EC2 instance (including Kubernetes.) In my use case this was because we had a foreach with 3000 splits. The following join step failed because metaflow was attempting to load all of the artifacts from the previous step.
This is because the code here creates a new boto session for every s3 url that is being downloaded. The AWS Instance Metadata Service has a throttle limit that causes the above error when it is queried to often.
The current workaround is to pass in boto3 credentials to the DATATOOLS_DEFAULT_CLIENT_PARAMS metaflow config variable. The solution looks something like this:
My proposed solution is to pull the boto3 session creation outside of the worker function and put it into the start_workers function with some method of recreating the credentials if they expire. I'll work on a PR next week with the proposed solution
The text was updated successfully, but these errors were encountered:
Botocore will throw an error of
botocore.exceptions.NoCredentialsError
if too many s3 objects are requested simultaneously on an AWS EC2 instance (including Kubernetes.) In my use case this was because we had a foreach with 3000 splits. The following join step failed because metaflow was attempting to load all of the artifacts from the previous step.This is because the code here creates a new boto session for every s3 url that is being downloaded. The AWS Instance Metadata Service has a throttle limit that causes the above error when it is queried to often.
The current workaround is to pass in boto3 credentials to the
DATATOOLS_DEFAULT_CLIENT_PARAMS
metaflow config variable. The solution looks something like this:With the following in a
creds.py
file:The flow can then be ran like so:
METAFLOW_DATATOOLS_DEFAULT_CLIENT_PARAMS=$(python creds.py) python flow_name.py …
My proposed solution is to pull the boto3 session creation outside of the
worker
function and put it into thestart_workers
function with some method of recreating the credentials if they expire. I'll work on a PR next week with the proposed solutionThe text was updated successfully, but these errors were encountered: