google / google/cloud-forensics-utils

CreateBucket throws BucketAlreadyOwnedByYou exception

Open
#442 0 comments 0 reactions 1 assignee Claimed by @ramo-j View on GitHub
Dominant language
Python
Stars
507
Forks
93
Avg merge
10m
Merged PRs (30d)
2

Description

From a jenkins e2e test:

```
Traceback (most recent call last):
File "/tmp/workspace/libcloudforensics-e2e-aws/libcloudforensics/providers/aws/internal/s3.py", line 94, in CreateBucket
bucket = client.create_bucket(
File "/usr/local/lib/python3.8/dist-packages/botocore/client.py", line 401, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.8/dist-packages/botocore/client.py", line 731, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.BucketAlreadyOwnedByYou: An error occurred (BucketAlreadyOwnedByYou) when calling the CreateBucket operation: Your previous request to create the named bucket succeeded and you already own it.
```

If the bucket exists and is already owned by the user, we probably shouldn't throw an error but allow them to continue. We can return a `created` value to indicate whether the bucket was created or already existed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.