com.amazonaws.services.s3.model.AmazonS3Exception:
The AWS Access Key Id you provided does not exist in our records.
(Service: Amazon S3; Status Code: 403;
Error Code: InvalidAccessKeyId;
Request ID: 8CYN8...QX4;
S3 Extended Request ID: /cXoTS2/Fl3Mj....2KjLCxUte4=; Proxy: null),
S3 Extended Request ID: /cXoTS2/Fl3M....KjLCxUte4=
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1819)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleServiceErrorResponse(AmazonHttpClient.java:1403)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1372)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1145)
If you are trying to access AWS S3 using the Java SDK and ProfileCredentialsProvider you get AmazonS3Exception InvalidAccessKeyId, the reason could be either of the below,
- You have provided an invalid aws_access_key_id in your AWS profile credentials in the .aws directory,
- The Access key must have expired,
- Check if the access key is not enclosed by double or single quotes, it should look something like the below,
% cat ~/.aws/credentials [default] aws_access_key_id = ABCDEYK2XYZANEEMOVA aws_secret_access_key = ABCDEFXyzhFNPwvctQ1X2DEK4k245aDh82a
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:
- Add Text at Start and End of Each Line Notepad++ - NotepadPlusPlus
- How to Comment out Code in PowerShell Script - Powershell
- How to make a Android button act as a toggle button - Android
- How to add hours and minutes to Java Instant - Java
- PHP 301 Redirect Permanently - PHP
- Round Number up to 2 decimal places in Python - Python
- Accept Only 0-9 Numbers RegEx Example - HowTos
- Take input argument from command line in Python Programming - Python