Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7411927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:27:44+00:00 2026-05-29T06:27:44+00:00

I am a beginner using S3 and I want to use it to store

  • 0

I am a beginner using S3 and I want to use it to store certain files of my computer. I wrote a small program in Java that uploads all my files and folders but I have this exception :

    Infos: Received error response: Status Code: 403, AWS Request ID: F75DC5496B071F7D, AWS Error Code: SignatureDoesNotMatch, AWS Error Message: The request signature we calculated does not match the signature you provided. Check your key and signing method., S3 Extended Request ID: XtRqjEuUmygswUxFUophRudYKbwi4OY4MK9QnYS4DMrH6JrHZXihUEC4mLZbPqz4
Exception in thread "main" Status Code: 403, AWS Request ID: F75DC5496B071F7D, AWS Error Code: SignatureDoesNotMatch, AWS Error Message: The request signature we calculated does not match the signature you provided. Check your key and signing method., S3 Extended Request ID: XtRqjEuUmygswUxFUophRudYKbwi4OY4MK9QnYS4DMrH6JrHZXihUEC4mLZbPqz4
    at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:538)
    at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:283)
    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:168)
    at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:2555)
    at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1044)
    at com.socialite.s3export.S3Export.parseDirectory(S3Export.java:89)
    at com.socialite.s3export.S3Export.parseDirectory(S3Export.java:73)
    at com.socialite.s3export.S3Export.parse(S3Export.java:48)
    at com.socialite.s3export.S3Export.main(S3Export.java:122)

I am sure I provided the correct credentials to the SDK. I used the same credentials from a previous program for testing purposes and it worked. It’s possible for me to create buckets but I am unable to store objects in it. In my code, I use the PutObjectRequest to store objects.

Here’s how I init my amazon S3 object :

AmazonS3 s3 = new AmazonS3Client(new PropertiesCredentials(
            S3Export.class                      .getResourceAsStream("AwsCredentials.properties")));

The uploading code :

private void parseDirectory(File fin, File fdefault, String out)
            throws FileNotFoundException {

        System.out.println("processing .." + fin.getName());

        File[] files = fin.listFiles();

        PrintWriter pw = new PrintWriter(fdefault);

        for (File f : files) {

            String key = UUID.randomUUID().toString();

            String name = "";

            PutObjectRequest por = null;

            if (f.isDirectory()) {

                name = "d_" + f.getName() + ".properties";

                File metadata = new File(out + name);

                parseDirectory(f, metadata, out);

                pw.println(key + "=" + name);

                //upload to s3
                por = new PutObjectRequest(this.bucketName, key, metadata);

            } else {

                name = f.getName();

                pw.println(key + "=" + name);

                por = new PutObjectRequest(this.bucketName, key, f);

            }


            this.amazonS3.putObject(por);
        }
        pw.close();
    }

My code fails in this line : this.amazonS3.putObject(por);.

Can somebody explain what is wrong with my code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:27:45+00:00Added an answer on May 29, 2026 at 6:27 am

    I finally find the anwer to my question. The truth is in the initialization, I passed a wrong bucket name and I am using a different name for making the requests. That’s all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hey guys, beginner here. I have written a program that outputs files to .txt's
Forgive my ignorance, but I am a beginner in java that comes from using
i am beginner in cakephp , and i want use SQL IN operator in
I want to make Login page by using LINQ. Can I use [Authorize] on
I am a mongodb beginner and I use pymongo. I want to know it
I want to make a search engine which will use Google to search all
I am a beginner at using Vaadin for designing the UI of my java
I am a beginner programmer in javascript. I don't use jQuery! And I want
EDIT: The plugin in question is located here . PHP beginner here using a
I am a beginner when it comes to using mysql queries embedded inside other

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.