
% aws s3 ls
A client error (SignatureDoesNotMatch) occurred when calling
the ListBuckets operation: The request signature we calculated
does not match the signature you provided.
Check your key and signing method.
While trying to run the aws s3 ls command to list all buckets using the aws cli 2, I ran into the above error message that said the request signature calculated did not match with the signature you provided.
I had set the AWS_SECRET_ACCESS_KEY and the AWS_ACCESS_KEY_ID which I re-check by doing a cat,
% cat ~/.aws/credentials
[default]
aws_access_key_id = AKIAYXXXXXXXXXXXXXXX
aws_secret_access_key = AKIAYXXXXXXXXXXXXXXX
Reason in my case:
As you can see I had set both the access and secret keys as the same, this caused the secret key to be wrong causing SignatureDoesNotMatch.
Some reasons for the SignatureDoesNotMatch AWS CLI Error:- Make sure that the secret keys are set correctly and valid.
- Make sure the secret key have not expired.
- Make sure you device time is up-to-date
- Make sure you copy-pasted the secret key correctly without leading/trailing spaces or typos.
More Posts related to AWS,
- Quick way to install AWS CLI for macOS Terminal
- How to Setup AWS Credentials using Visual Studio Code
- AW3 CLI command to get list of all region names
- AWS S3 CLI BucketAlreadyExists when calling CreateBucket Error make_bucket failed
- [Solution] AWS Java SDK S3 AmazonS3Exception InvalidAccessKeyId
- How to install AWS CLI on Ubuntu
- Fix AWS CLI 2 SignatureDoesNotMatch Error - Signature we calculated does not match
- [Solution] com.amazonaws.dynamodb.v20120810 MissingAuthenticationToken Key Id or X.509 certificate
- How to install AWS Toolkit for Visual Studio Code
- Create an S3 bucket in a specific AWS region using CLI Command
- Get the total size and number of objects of a AWS S3 bucket and folders
- Most Essencial AWS CLI 2 S3 ls Command Options
- Setting and Updating AWS CLI Configuration
- Create S3 bucket using AWS CLI Command mb
- Quick way to setup AWS DynamoDB locally on macOS
More Posts:
- Generate Project Dependency tree using Gradle Command - Gradle
- How to Copy full Absolute Path of a File on Mac - MacOS
- Notepad++ Ghost typing Examples - NotepadPlusPlus
- [Microsoft Teams 4c7] Modern authentication failed here, but you'll still be able to sign in. Your status code is 4c7 error - Microsoft
- Compare two files in Notepad++ - NotepadPlusPlus
- Mac OS X Error: Could not create the Java Virtual Machine - Mac-OS-X
- SharePoint 2010 August 2015 Update KB3055049 - Duplicate Document ID issue bug fixed - SharePoint
- Compare two text files in Notepad++ - NotepadPlusPlus