The NoSuchBucket error occurs when working with a bucket via AWS CLI
When running a command in AWS CLI for an existing bucket, the error An error occurred (NoSuchBucket) when calling the... operation: The specified bucket does not exist is returned.
The issue may occur for several reasons:
- typos in the bucket name;
- the region in the AWS CLI configuration does not match the region of the account;
- the VK Object Storage service domain is not specified in the command or is specified incorrectly.
-
Make sure the bucket name is specified correctly.
-
Make sure that the
--endpoint-urlcommand parameter specifies the service domain correctly and it matches the region of the VK Object Storage account:https://hb.vkcloud-storage.ruorhttps://hb.ru-msk.vkcloud-storage.ru— the domain of the Moscow region;https://hb.kz-ast.vkcloud-storage.ru— the domain of the Kazakhstan region.
-
Check the AWS CLI configuration:
aws configure listThe response must contain in the
regionfield one of the values corresponding to the region of the VK Object Storage account:ru-msk— for the Moscow region;kz-ast— for the Kazakhstan region.
-
If the
regionfield value is incorrect, change the AWS CLI settings:-
Run the command:
aws configure -
Fill in the parameter values:
AWS Access Key ID: enter the Access Key ID value for your VK Object Storage account.AWS Secret Access Key: enter the Secret Key value for your VK Object Storage account.Default region name: enterru-mskorkz-ast.Default output format: enterjson.
-
Was this article helpful?