% 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,
- Get the total size and number of objects of a AWS S3 bucket and folders
- How to Create AWS SNS Topic using AWS CLI
- Fix: Amazon Linux bash: sudo: command not found
- [Solution] AWS Java SDK S3 AmazonS3Exception InvalidAccessKeyId
- Create an AWS User using CLI2 Command at a specific Path
- Fix: Missing the following required SSO configuration values: sso_start_url, sso_region
- Fix: zsh: command not found: aws (Mac/macOS)
- Configure AWS Access ID and Secret Keys using CLI on Mac
- Quick way to setup AWS DynamoDB locally on macOS
- Most Essencial AWS CLI 2 S3 ls Command Options
- How to Check AWS SNS Permissions using CLI
- AWS CLI Change Default Output Format
- How to install AWS CLI on Ubuntu
- Quick way to install AWS CLI for macOS Terminal
- Install AWS CLI using Brew Command
- AWS CLI Command to Get a List of SNS Topics
- Get List of AWS SNS Topic Subscriptions using CLI
- How to Setup AWS Credentials using Visual Studio Code
- Installing AWS CLI Version 2 on macOS Sonoma using Terminal
- AW3 CLI command to get list of all region names
- AWS SNS CLI Command Publish Message Attributes
- Create an S3 bucket in a specific AWS region using CLI Command
- [Fix] zsh: command not found: awscli [Mac Terminal]
- Understanding AWS Calculator: DynamoDB on-demand capacity
- [Solution] com.amazonaws.dynamodb.v20120810 MissingAuthenticationToken Key Id or X.509 certificate
More Posts:
- How to Setup maven on Mac (macOS) - Mac-OS-X
- Nano Show Line Numbers - Linux
- wget Command on macOS Terminal - MacOS
- [fix] macOS Ventura - Python3 xcrun: error: invalid active developer path missing xcrun at CommandLineTools - MacOS
- Make Bootstrap Button look like a link - Bootstrap
- Safari appends .html extension to files that are downloaded - Mac-OS-X
- How to tar.gz a directory or folder Command - Linux
- [JEP 431] Java JDK 21 New Feature - Sequenced Collections - Java-JDK-21