s3-credentials icon indicating copy to clipboard operation
s3-credentials copied to clipboard

create fails if user already has two access keys

Open simonw opened this issue 3 years ago • 2 comments

Incidentally, trying to call create with the same username 3 times hits the issue you've noted above, that there can only be 2 active access keys:

s3-credentials create --username USERNAME "BUCKET_NAME"
Attached policy s3.read-write.USERNAME to user USERNAME
Traceback (most recent call last):
...
botocore.errorfactory.LimitExceededException: An error occurred (LimitExceeded) when calling the CreateAccessKey operation: Cannot exceed quota for AccessKeysPerUser: 2

Originally posted by @kimvanwyk in https://github.com/simonw/s3-credentials/issues/60#issuecomment-1016842897

simonw avatar Jan 19 '22 20:01 simonw

Deactivating one of the keys wasn't enough - I got the same AccessKeysPerUser quota error when running the create command after deactivating one of the 2 access keys the user had.

After I deleted an existing access key the create command worked as expected.

kimvanwyk avatar Jan 19 '22 20:01 kimvanwyk

At the very least should make that error less ugly - but also need a useful path forward, which likely means solving:

  • #60

simonw avatar Jan 19 '22 20:01 simonw