% aws s3 ls
An error occurred (AccessDenied) when calling the ListBuckets operation: Access Denied
% aws s3 mb s3://mybucket
make_bucket failed: s3://mybucket An error occurred (AccessDenied) when calling the CreateBucket operation: Access Denied
% aws s3 rb s3://mybucket
remove_bucket failed: s3://mybucket An error occurred (AccessDenied) when calling the DeleteBucket operation: Access Denied
There could be multiple reasons for AccessDenied errors when using AWS S3 using CLI, the most common one is that you may not have permissions on a specific region you are trying to access S3.
Solutions:- Make use of the region you have access to along with S3 CLI command --region=us-east-1
- Recongifure your configure your default location in the ~/.aws/config file, or by running aws configure command,
- Provide access to the region by updating the AWS Policy - check with your Cloud Admin.
More Posts:
- Detect swipes on Android Activity - Android
- How to create a New Project in Visual Studio Code (VS Code) - HowTos
- Change the default diff or commit editor for git - Git
- How to Get the Relative Path of a file in Python Program - Python
- Python: Convert Set to a List - Python
- How to stop or quit cat command? - HowTos
- Aw Snap! Something went wrong while displaying this webpage Error code: STATUS_INVALID_IMAGE_HASH - Chrome
- Change the default Line Encoding Notepad++ (CR LF) - NotepadPlusPlus