DistributedScience / Distributed-CellProfiler

Run encapsulated docker containers with CellProfiler in the Amazon Web Services infrastructure.
https://distributedscience.github.io/Distributed-CellProfiler/
Other
37 stars 24 forks source link

Better error message for failed Transfer of CellProfiler logs to S3 #144

Closed ErinWeisbart closed 1 month ago

ErinWeisbart commented 1 year ago
Transfer of CellProfiler logs to S3 initiated
Traceback (most recent call last):
  File "run.py", line 786, in <module>
    monitor()
  File "run.py", line 763, in monitor
    export_logs(logs, loggroupId, starttime, bucketId)
  File "run.py", line 319, in export_logs
    result = logs.create_export_task(taskName = loggroupId, logGroupName = loggroupId, fromTime = int(starttime), to = int(time.time()*1000), destination = bucketId, destinationPrefix = 'exportedlogs/'+loggroupId)
  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.errorfactory.InvalidParameterException: An error occurred (InvalidParameterException) when calling the CreateExportTask operation: GetBucketAcl call on the given bucket failed. Please check if CloudWatch Logs has been granted permission to perform this operation.
bethac07 commented 1 year ago

This is a bucket configuration issue, there's nothing that DCP should do about it; we link to how to fix it in the documentation.

We could/should probably catch it with a nicer error message, but my $0.02 is we don't want DCP messing with bucket permissions.

ErinWeisbart commented 1 year ago

Man, I've been working in too many AWS accounts recently because I totally missed that it was account specific based on on the bucket configuration. I'll update it to a nicer error message and call it good. I agree that we don't wan't DCP changing permissions.